netromdk / slacker

Slacker - Easy access to the Slack API and admin of workspaces/teams.
MIT License
14 stars 0 forks source link

Read-only mode #75

Closed netromdk closed 6 years ago

netromdk commented 6 years ago

It might be an idea to introduce an optional, nondestructive read-only mode, which when in effect will disallow all API methods that are destructive or that modifies state.

The idea is that you have a token for a workspace but you want to be sure that you don't do damage by mistake. Like when running files.delete without being careful.

This should be configurable directly with the config command with --set-read-only <True|False>. Every command must then check for config.read_only() and/or we put it into SlackAPI so that for such methods it will simply not send the request, and instead write to log that it didn't do it due to read-only mode.

When in read-only mode, the prompt should state this somehow, like

(read-only) workspace>