public void AddPermissions(ModuleGlossaryNew module) { if (module.ViewTerm) { ViewTerm = module.ViewTerm; } if (module.EditGlossary) { EditGlossary = module.EditGlossary; } if (module.DeleteGlossary) { DeleteGlossary = module.DeleteGlossary; } if (module.AddTerm) { AddTerm = module.AddTerm; } if (module.EditTerm) { EditTerm = module.EditTerm; } if (module.DeleteTerm) { DeleteTerm = module.DeleteTerm; } if (module.ViewStat) { ViewStat = module.ViewStat; } }
public GlossaryPermission(ModuleGlossaryNew module) : this() { ViewTerm = module.ViewTerm; EditGlossary = module.EditGlossary; DeleteGlossary = module.DeleteGlossary; AddTerm = module.AddTerm; EditTerm = module.EditTerm; DeleteTerm = module.DeleteTerm; ViewStat = module.ViewStat; }
public static ModuleGlossaryNew CreatePortalmodule(int UserTypeID) { var module = new ModuleGlossaryNew(); module.ViewTerm = (UserTypeID != (int)UserTypeStandard.Guest); module.AddTerm = (UserTypeID == (int)UserTypeStandard.SysAdmin || UserTypeID == (int)UserTypeStandard.Administrator); module.EditTerm = (UserTypeID == (int)UserTypeStandard.SysAdmin || UserTypeID == (int)UserTypeStandard.Administrator); module.DeleteTerm = (UserTypeID == (int)UserTypeStandard.SysAdmin || UserTypeID == (int)UserTypeStandard.Administrator); module.ManageGlossary = (UserTypeID == (int)UserTypeStandard.SysAdmin || UserTypeID == (int)UserTypeStandard.Administrator); module.Administration = (UserTypeID == (int)UserTypeStandard.SysAdmin || UserTypeID == (int)UserTypeStandard.Administrator); return(module); }