Ejemplo n.º 1
0
        public bool AssignRoleToUserForResource(IUser user, IRole role,
                                                IResource resource, out string message)
        {
            bool success = false;

            if (!_resources.ContainsKey(resource.Name))
            {
                message = "Resource: " + resource.Name + "doesn't exist";
            }
            else
            {
                success = resource.AddRoleToUserForResource(user, role, out message);
            }

            return(success);
        }