Esempio n. 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;
 }
Esempio n. 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;
 }
Esempio n. 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;
 }
 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;
 }
 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;
 }
Esempio n. 6
0
 public RocketPermissionsProviderResult SaveGroup(RocketPermissionsGroup group)
 {
     return RocketPermissionsProviderResult.Success;
 }
 public RocketPermissionsProviderResult SaveGroup(RocketPermissionsGroup group)
 {
     return helper.SaveGroup(group);
 }
 public RocketPermissionsProviderResult DeleteGroup(RocketPermissionsGroup group)
 {
     return helper.DeleteGroup(group.Id);
 }
 public RocketPermissionsProviderResult AddGroup(RocketPermissionsGroup group)
 {
     return _basePermissionProvider.AddGroup(group);
 }