Esempio n. 1
0
        public virtual bool Authorize(T_Permission permission, T_User user)
        {
            if (permission == null)
            {
                return(false);
            }

            if (user == null)
            {
                return(false);
            }

            //old implementation of Authorize method
            //var customerRoles = customer.CustomerRoles.Where(cr => cr.Active);
            //foreach (var role in customerRoles)
            //    foreach (var permission1 in role.PermissionRecords)
            //        if (permission1.SystemName.Equals(permission.SystemName, StringComparison.InvariantCultureIgnoreCase))
            //            return true;

            //return false;

            return(Authorize(permission.Name, user));
        }
Esempio n. 2
0
 public void UpdatePermission(T_Permission permission)
 {
     throw new NotImplementedException();
 }
Esempio n. 3
0
 public void InsertPermission(T_Permission permission)
 {
     throw new NotImplementedException();
 }