Add User Permission check

This commit is contained in:
Henrique Dias
2017-07-14 07:51:32 +01:00
parent 729064ffc8
commit 7889b8488d
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"`