forked from anormaltwig/warden
-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
enhancementNew feature or requestNew feature or requesthelp wantedExtra attention is neededExtra attention is needed
Description
Warden.CheckPermission is probably the most important function the addon has, but it probably needs to be rewritten to improve its efficiency. There is quite a lot this function needs to do, and in a particular order:
- get the permission object and owners
- check if the permission should be cancelled by touch settings
- check all of the following conditions for both whitelist and the current permission:
3.1. check for any entity filters set by the server -> check if the receiver bypasses the filter with admin level
3.2. check if the receiver bypasses permissions with admin level
3.3. check if the granter is a bot and whether bots should get their permissions bypassed
3.4. check if the receiver or granter is the world
3.5. check if the receiver and granter are both valid
3.6. check if another addon overrides perms
3.7. check if the receiver and granter are the same person
3.8. check if the permission is enabled
3.9. check if the granter has persistent perms enabled (to determine the default setting for global-set perms)
3.10. check if the perm's global setting matches its local setting
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or requesthelp wantedExtra attention is neededExtra attention is needed