Пример #1
0
 public RocketPermissionsGroup GetGroup(string groupId)
 {
     string group = "";
     group = LIGHT.Instance.Database.CheckUserGroupByID(groupId);
     RocketPermissionsGroup RPG = new RocketPermissionsGroup(group, group, LIGHT.Instance.Database.getParentGroup(group), LIGHT.Instance.Database.getMembers(group), GetGroupPermission(groupId), LIGHT.Instance.Database.GetColor(group));
     return RPG;
 }
Пример #2
0
 public RocketPermissionsProviderResult AddGroup(RocketPermissionsGroup group)
 {
     if(LIGHT.Instance.Database.AddGroup(group.DisplayName,"10",group.ParentGroup,"",99,false))
         return RocketPermissionsProviderResult.Success;
     else
         return RocketPermissionsProviderResult.UnspecifiedError;
 }
Пример #3
0
 public List<RocketPermissionsGroup> GetGroups(IRocketPlayer player , bool IncludeParentGroup)
 {
     List<RocketPermissionsGroup> Group = new List<RocketPermissionsGroup>();
     string group = "";
     group = LIGHT.Instance.Database.CheckUserGroup(player.Id);
     if (group == null || group == "")
         group = "default";
     RocketPermissionsGroup RPG = new RocketPermissionsGroup(group, group, LIGHT.Instance.Database.getParentGroup(group), LIGHT.Instance.Database.getMembers(group), LIGHT.Instance.Database.getGroupPermission(group).ToList());
     Group.Add(RPG);
     return Group;
 }
Пример #4
0
 internal RocketPermissionsProviderResult SaveGroup(RocketPermissionsGroup group)
 {
     int i = permissions.Instance.Groups.FindIndex(gr => gr.Id == group.Id);
     if (i < 0) return RocketPermissionsProviderResult.GroupNotFound;
     permissions.Instance.Groups[i] = group;
     permissions.Save();
     return RocketPermissionsProviderResult.Success;
 }
Пример #5
0
 internal RocketPermissionsProviderResult AddGroup(RocketPermissionsGroup group)
 {
     int i = permissions.Instance.Groups.FindIndex(gr => gr.Id == group.Id);
     if (i != -1) return RocketPermissionsProviderResult.DuplicateEntry;
     permissions.Instance.Groups.Add(group);
     permissions.Save();
     return RocketPermissionsProviderResult.Success;
 }
Пример #6
0
 public RocketPermissionsProviderResult SaveGroup(RocketPermissionsGroup group)
 {
     return RocketPermissionsProviderResult.Success;
 }
Пример #7
0
 public RocketPermissionsProviderResult SaveGroup(RocketPermissionsGroup group)
 {
     return helper.SaveGroup(group);
 }
Пример #8
0
 public RocketPermissionsProviderResult DeleteGroup(RocketPermissionsGroup group)
 {
     return helper.DeleteGroup(group.Id);
 }
 public RocketPermissionsProviderResult AddGroup(RocketPermissionsGroup group)
 {
     return _basePermissionProvider.AddGroup(group);
 }