-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Permission system #25
Comments
Preparation for saving cfg #25. Config is serialized as XML now. Added possibility to show motd in chat instead of mission screen.
Just updated the first post because I don't like my first idea anymore. I hope the new concept is understandable. Let me now what you think about it. |
I'm with some internet now. |
Yes, but I want the admins to be able to create the groups, not only to organize them. If we use enums, we need to predefine the groups, right? I want to give the admins more flexibility. I don't want to predefine anything except for default values. |
Custom groups. Yes, that make a lot more sense. Every command will need to be defined in the configuration. |
Changed ChatCommandSecurity to uint - Users have level 0, Admins level 100. - For commands that are in development there is a experimental flag. Refined handling of connection requests.
- clients will receive their permissions when they join - any command executions are blocked until they received all the security information - added config setting "AdminLevel" this will define the default level of a server admin (default value is ChatCommandSecurity.Admin) - commands will be registered in only one dictionary in order to simplify the process of updating the command security - commands use the command name as a unique id - if ChatCommand.Invoke() returns false the client will get displayed the brief help #41 - /cfg and /msg will tell the user that they can not be used in offline mode
Below there is the help of the /perm command. Would you agree that it might be better to make a command for each domain? {0} = player name This command is used for organizing the permissions ingame. Syntax: Domains: command, player, group Each domain has specific actions. See below: Actions:
|
A single command does make it easier to remember. |
That's true it is easier to remember but it felt unnecessary to type in '/perm' all the time while you have to specify which domain you want to use. |
- Implemented /perm, see the command help for a descriptiom
- permissions were not sent to the client in several cases - added message when the level of a command was changed - fixed some typos
In case you want to release the permissions with the fix, you can use the doc below. At the moment I consider the permission feature as work in progress because it lacks some features but it is usable, at least I don't find bugs anymore. So why not releasing it? Permissions (WIP) |
- added hotlists for commands, players and groups - added adminlevel to /cfg command - player entries in permissions will be updated when a player changes his name - fixed crash when someone tries to change the level of a command while a player is online who has not been added to the permissions file yet - permissions were not saved after creating a group
You can remove the "WIP" now and the note at the bottom now. |
The commands get "permission levels" ("security level" would be also fine by me) and the players get such a level. The levels are integers (maybe unsigned, but we could use < 0 for special purposes).The player can execute a command that's below or equal to his level. By default we set commands for users to 0 and commands for admins to 100 and so are the levels for the admins and users. When a player connects to the server, all the commands are set to 100 and the players level is 0 so that he can't do anything until he has received his level and the levels of the commands from the server.
Furthermore we can implement groups that have a name, a level and that contain players, so that the admin can setup the group "Mods" with level 50 and give them the right to use forcekick, listships, tp, tpp, etc.
And to top that we can implement certain "exceptional" permissions that can be set for each player, so that the server tells the client of one of the mods that the level for forcekick is 100 because he has abused it and the admin doesn't want him to use it anymore.
Why change the current system?
We do not really need to change it. But I think it would be easier with the other concept
The text was updated successfully, but these errors were encountered: