diff options
author | Iaccidentally <coryhuckaby@gmail.com> | 2013-01-11 19:59:22 -0500 |
---|---|---|
committer | Iaccidentally <coryhuckaby@gmail.com> | 2013-01-11 19:59:22 -0500 |
commit | eb7cedd6fd5dae2353bdd47b2ce09942460fd8a6 (patch) | |
tree | 4c8a85944a28daeffd50b47b8646aaa71b10e71d /EssentialsGroupManager/src/org/anjocaido/groupmanager/utils/PermissionCheckResult.java | |
parent | 859ca6e9199b2fe3ce652d3cb56a76559c2b4aca (diff) | |
download | Essentials-eb7cedd6fd5dae2353bdd47b2ce09942460fd8a6.tar Essentials-eb7cedd6fd5dae2353bdd47b2ce09942460fd8a6.tar.gz Essentials-eb7cedd6fd5dae2353bdd47b2ce09942460fd8a6.tar.lz Essentials-eb7cedd6fd5dae2353bdd47b2ce09942460fd8a6.tar.xz Essentials-eb7cedd6fd5dae2353bdd47b2ce09942460fd8a6.zip |
Revert "Remove GM from 3.0"
This reverts commit a4c93fef05493e6210e8d3d72af7b6d492f4e121.
Diffstat (limited to 'EssentialsGroupManager/src/org/anjocaido/groupmanager/utils/PermissionCheckResult.java')
-rw-r--r-- | EssentialsGroupManager/src/org/anjocaido/groupmanager/utils/PermissionCheckResult.java | 67 |
1 files changed, 67 insertions, 0 deletions
diff --git a/EssentialsGroupManager/src/org/anjocaido/groupmanager/utils/PermissionCheckResult.java b/EssentialsGroupManager/src/org/anjocaido/groupmanager/utils/PermissionCheckResult.java new file mode 100644 index 000000000..eb6633863 --- /dev/null +++ b/EssentialsGroupManager/src/org/anjocaido/groupmanager/utils/PermissionCheckResult.java @@ -0,0 +1,67 @@ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ +package org.anjocaido.groupmanager.utils; + +import org.anjocaido.groupmanager.data.DataUnit; + +/** + * + * @author gabrielcouto + */ +public class PermissionCheckResult { + + /** + * It should be the owner of the access level found. + * + * Use instanceof to find the owner type + */ + public DataUnit owner; + /** + * The permission node found in the DataUnit. + */ + public String accessLevel; + /** + * The full name of the permission you are looking for + */ + public String askedPermission; + /** + * The result conclusion of the search. + * It determines if the owner can do, or not. + * + * It even determines if it has an owner. + */ + public Type resultType = Type.NOTFOUND; + + /** + * The type of result the search can give. + */ + public enum Type { + + /** + * If found a matching node starting with '+'. + * It means the user CAN do the permission. + */ + EXCEPTION, + /** + * If found a matching node starting with '-'. + * It means the user CANNOT do the permission. + */ + NEGATION, + /** + * If just found a common matching node. + * IT means the user CAN do the permission. + */ + FOUND, + /** + * If no matchin node was found. + * It means the user CANNOT do the permission. + * + * owner field and accessLevel field should not be considered, + * when type is + * NOTFOUND + */ + NOTFOUND + } +} |