Beispiel #1
0
 void AddRoles(IModelRegistration modelRegistration, ITypeInfo userTypeInfo, ISecurityUserWithRoles securityUserWithRoles,
                      IObjectSpace objectSpace) {
     var roles = (XPBaseCollection) userTypeInfo.FindMember("Roles").GetValue(securityUserWithRoles);
     var roleType = modelRegistration.RoleModelClass.TypeInfo.Type;
     var criteria = CriteriaOperator.Parse(modelRegistration.RoleCriteria);
     var objects = objectSpace.GetObjects(roleType, criteria);
     roles.BaseAddRange(objects);
 }
Beispiel #2
0
        void AddRoles(IModelRegistration modelRegistration, ITypeInfo userTypeInfo, ISecurityUserWithRoles securityUserWithRoles,
                      IObjectSpace objectSpace)
        {
            var roles    = (XPBaseCollection)userTypeInfo.FindMember("Roles").GetValue(securityUserWithRoles);
            var roleType = modelRegistration.RoleModelClass.TypeInfo.Type;
            var criteria = CriteriaOperator.Parse(modelRegistration.RoleCriteria);
            var objects  = objectSpace.GetObjects(roleType, criteria);

            roles.BaseAddRange(objects);
        }
Beispiel #3
0
 public static IModelList <IModelClass> Get_RoleClasses(IModelRegistration modelRegistration)
 {
     return(modelRegistration.RoleModelClasses());
 }
Beispiel #4
0
 public static IModelList <IModelClass> Get_UserClasses(IModelRegistration modelRegistration)
 {
     return(modelRegistration.UserModelClasses());
 }
Beispiel #5
0
 public static IModelMember Get_EmailMember(IModelRegistration modelRegistration)
 {
     return(modelRegistration.UserModelClass != null?modelRegistration.UserModelClass.FindMember("Email") : null);
 }
Beispiel #6
0
 public static IModelClass Get_RoleModelClass(IModelRegistration modelRegistration)
 {
     return(modelRegistration.ModelClasses(typeof(XpandRole)).First());
 }
Beispiel #7
0
 public static IModelList<IModelClass> Get_UserClasses(IModelRegistration modelRegistration){
     return modelRegistration.UserModelClasses();
 }
Beispiel #8
0
 public static IModelList <IModelMember> Get_ActivationIdMembers(IModelRegistration modelRegistration)
 {
     return(modelRegistration.UserModelClass == null? new CalculatedModelNodeList <IModelMember>()
                : new CalculatedModelNodeList <IModelMember>(modelRegistration.UserModelClass.AllMembers.Where(
                                                                 member => member.MemberInfo.MemberType == typeof(string))));
 }
Beispiel #9
0
 public static IModelClass Get_RoleModelClass(IModelRegistration modelRegistration) {
     return modelRegistration.ModelClasses(typeof(XpandRole)).First();
 }
Beispiel #10
0
 public static IModelList<IModelClass> Get_RoleClasses(IModelRegistration modelRegistration){
     return modelRegistration.RoleModelClasses();
 }
Beispiel #11
0
 public static IModelClass Get_UserModelClass(IModelRegistration modelRegistration) {
     return modelRegistration.ModelClasses(typeof(XpandUser)).First();
 }
Beispiel #12
0
 public static IModelMember Get_EmailMember(IModelRegistration modelRegistration) {
     return modelRegistration.UserModelClass!=null ? modelRegistration.UserModelClass.FindMember("Email") : null;
 }
Beispiel #13
0
 public static IModelClass Get_UserModelClass(IModelRegistration modelRegistration)
 {
     return(modelRegistration.ModelClasses(typeof(ISecurityUser)).First());
 }
Beispiel #14
0
 public static IModelMember Get_EmailMember(IModelRegistration modelRegistration)
 {
     return(modelRegistration.UserModelClass?.FindMember("Email"));
 }
Beispiel #15
0
 public static IModelList<IModelMember> Get_ActivationIdMembers(IModelRegistration modelRegistration) {
     return modelRegistration.UserModelClass == null? new CalculatedModelNodeList<IModelMember>()
                : new CalculatedModelNodeList<IModelMember>(modelRegistration.UserModelClass.AllMembers.Where(
                    member => member.MemberInfo.MemberType == typeof (string)));
 }