Add User Permission check

Former-commit-id: 7ebed9e49ec603879685519d1faf7ed3d83e1ac6 [formerly 31dbbd185fa977815ceb6ea249f13c6935043e0f] [formerly f5c6acbcaea7fe009c2c26c8e9f3c10ed302d702 [formerly 7889b8488d9b1341f685bb75def6bf61dd5a8b49]]
Former-commit-id: 6f4a50f74ea9e573f1d520d91bec9f1d09213cca [formerly 957d5ecb7e92a81995eda1e41097beb21ef27f3f]
Former-commit-id: 1503bc70e1ff6eab125278aade3493e5b7ab5a71
This commit is contained in:
Henrique Dias
2017-07-14 07:51:32 +01:00
parent fc1a78bb27
commit 9af6519280
2 changed files with 17 additions and 4 deletions

View File

@@ -81,9 +81,10 @@ type User struct {
CSS string `json:"css"`
// These indicate if the user can perform certain actions.
AllowNew bool `json:"allowNew"` // Create files and folders
AllowEdit bool `json:"allowEdit"` // Edit/rename files
AllowCommands bool `json:"allowCommands"` // Execute commands
AllowNew bool `json:"allowNew"` // Create files and folders
AllowEdit bool `json:"allowEdit"` // Edit/rename files
AllowCommands bool `json:"allowCommands"` // Execute commands
Permissions map[string]bool `json:"permissions"` // Permissions added by plugins
// Commands is the list of commands the user can execute.
Commands []string `json:"commands"`