Example #1
0
        internal DbUser(UserStruct? user, ParentClass parent, ConnectionStringStruct connection, DataAccessErrorDelegate errorMessageDelegate, bool standAlone)
        {
            this.parent = parent;
            connectionString = connection;
            ErrorMessageDelegate = errorMessageDelegate;

            cache = new Cache(true);

            if (!user.HasValue)
                throw new NoValidUserException();

            this.authenticationStruct = user.Value;
            this.username = user.Value.UserName;
            this.hashedPassword = user.Value.Password;

            this.standAlone = standAlone;
            this.user = user;

            securityFramework = MLifter.DAL.Security.SecurityFramework.GetDataAdapter(this);
            if (username != null && securityFramework != null)
            {
                try
                {
                    securityToken = securityFramework.CreateSecurityToken(this.username);
                    securityToken.IsCaching = cachePermissions;
                }
                catch (Exception ex)
                {
                    Debug.WriteLine("Failed to create security token! (" + ex.Message + ")");
                }
            }

            Login();
        }
Example #2
0
 internal SecurityToken(User user, Framework fw)
 {
     _User = user;
     _Framework = fw;
 }
Example #3
0
 public TypePermissionInformation(Framework fw, TypeInfo ti, PermissionInfo pi, Role ar, bool isInherited)
 {
     SecurityFramework = fw;
     TypeInfo = ti;
     PermissionInfo = pi;
     ActualRole = ar;
     IsInherited = isInherited;
 }
Example #4
0
 public TypeInformation(Framework fw, Role actualRole, TypeInfo ti)
 {
     SecurityFramework = fw;
     ActualRole = actualRole;
     TypeInfo = ti;
 }
Example #5
0
 public ObjectPermissionInformation(Framework fw, object obj, PermissionInfo pi, Role ar, bool isInherited)
 {
     SecurityFramework = fw;
     Obj = obj;
     PermissionInfo = pi;
     ActualRole = ar;
     IsInherited = isInherited;
 }
Example #6
0
 public ObjectInformation(Framework fw, Role actualRole, object obj)
 {
     SecurityFramework = fw;
     ActualRole = actualRole;
     Obj = obj;
 }
Example #7
0
 public GroupInfo(Group g, Framework fw)
 {
     Group = g;
     _Framework = fw;
 }