public PermissionHelperResult SetPrefix(string prefix, string group)
        {
            RocketPermissionsGroup Group = Permissions.GetGroup(group);

            if (Group != null)
            {
                if (Group.Prefix != prefix)
                {
                    Group.Prefix = prefix;
                    Permissions.SaveGroup(Group);
                    return(PermissionHelperResult.Success);
                }
                else if (Group.Prefix == prefix)
                {
                    return(PermissionHelperResult.DuplicateEntry);
                }
            }
            else if (Group == null)
            {
                return(PermissionHelperResult.GroupNotFound);
            }
            return(PermissionHelperResult.UnspecifiedError);
        }
 public RocketPermissionsGroup GetGroup(string groupId) => _basePermissionProvider.GetGroup(groupId);
Ejemplo n.º 3
0
 public RocketPermissionsGroup GetGroup(string groupId)
 {
     return(_defaultProvider.GetGroup(groupId));
 }
 public RocketPermissionsGroup GetGroup(string groupId)
 {
     return(Underlying.GetGroup(groupId));
 }