void InitialisePermissions() { _groups = new GroupTable(); _nodes = new PermissionTable(); _userPerms = new UserPermissions(); _groupPerms = new GroupPermissions(); _users = new UsersTable(); _groups.Initialise(this); _nodes.Initialise(this); _userPerms.Initialise(this); _groupPerms.Initialise(this); _users.Initialise(this); }
void InitialisePermissions() { _groups = new GroupTable(); _nodes = new PermissionTable(); _userPerms = new UserPermissions(); _groupPerms = new GroupPermissions(); _users = new UserGroupsTable(); _groups.Initialise(this); _nodes.Initialise(this); _userPerms.Initialise(this); _groupPerms.Initialise(this); _users.Initialise(this); if (!Procedure_IsPermitted.Exists(this)) { ProgramLog.Admin.Log("Permission procedure does not exist and will now be created"); Procedure_IsPermitted.Create(this); } }
static void CreateGroup(string name, bool guest, string parent, byte r, byte g, byte b, string[] nodes, MySQLConnector conn) { long id; using (var bl = new MySQLQueryBuilder(SqlPermissions.SQLSafeName)) { bl.InsertInto(TableName, new DataParameter(ColumnNames.Name, name), new DataParameter(ColumnNames.ApplyToGuests, guest), new DataParameter(ColumnNames.Parent, parent), new DataParameter(ColumnNames.Chat_Red, r), new DataParameter(ColumnNames.Chat_Green, g), new DataParameter(ColumnNames.Chat_Blue, b) ); id = ((IDataConnector)conn).ExecuteInsert(bl); } foreach (var nd in nodes) { var nodeId = PermissionTable.Insert(conn, nd, false); GroupPermissions.Insert(conn, id, nodeId); } }
void InitialisePermissions() { _groups = new GroupTable(); _nodes = new PermissionTable(); _userPerms = new UserPermissions(); _groupPerms = new GroupPermissions(); _users = new UserGroupsTable(); _nodes.Initialise(this); _userPerms.Initialise(this); _groupPerms.Initialise(this); _users.Initialise(this); //Used to create default permissions _groups.Initialise(this); //Initialise procedures Procedures.Init(this); }