Esempio n. 1
0
 public static CompUserRole create(string value, CompRole role) {
   if (value == null && role != 0) return new CompUserRole { Role = role }; else return FromString(value);
 }
Esempio n. 2
0
 public void setCompanyUserRoles(string compId, string email, CompRole role) { //pridani nebo aktualizace firemniho spravce. role==0 => vymazani
   refreshUserCompanyRelation(compId, email, (comp, user) => {
     if (role != 0) user.Roles.Role |= (role & ~nonCompAdminsRoles); else user.Roles.Role &= nonCompAdminsRoles; /*zachova pouze nonCompAdminsRoles*/
     comp.Roles = user.Roles;
   });
 }
Esempio n. 3
0
 public HumanEvalInfo[] HumanEvalatorInfos; //jazyky HumanEvalator role
 public override string ToString() { this.Role = this.Role & CompRole.All; return XmlUtils.ObjectToString(this); } //TODO ROLE
Esempio n. 4
0
File: My.cs Progetto: PavelPZ/NetNew
 static bool checkRole(Container db, Int64 lmcomUserId, int companyId, CompRole role) {
   var r = db.CompanyUsers.Where(c => c.CompanyId == companyId && c.UserId == lmcomUserId).Select(c => c.Roles).FirstOrDefault();
   return (r & (long)role) == (long)role;
 }