Exemplo 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);
 }
Exemplo 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;
   });
 }
Exemplo 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
Exemplo n.º 4
0
Arquivo: My.cs Projeto: 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;
 }