public IEnumerable<ASC.Common.Security.Authorizing.IRole> GetObjectRoles(ASC.Common.Security.Authorizing.ISubject account, ISecurityObjectId objectId, SecurityCallContext callContext) { List<IRole> roles = new List<IRole>(); if (account.ID.Equals(this.OwnerId)) roles.Add(ASC.Common.Security.Authorizing.Constants.Owner); return roles; }
public IEnumerable<IRole> GetObjectRoles(ISubject account, ISecurityObjectId objectId, SecurityCallContext callContext) { // Constants.Everyone // if (_daoFactory.GetManagerDao().GetAll(false).Contains(ASC.Core.CoreContext.UserManager.GetUsers(account.ID))) // return new Action[] throw new NotImplementedException(); }
public IEnumerable<IRole> GetObjectRoles(ISubject account, ISecurityObjectId objectId, SecurityCallContext callContext) { var roles = new List<IRole>(); if (blogOwner != null && blogOwner.ID.Equals(account.ID)) { roles.Add(ASC.Common.Security.Authorizing.Constants.Owner); } return roles; }
public IEnumerable<IRole> GetObjectRoles(ISubject account, ISecurityObjectId objectId, SecurityCallContext callContext) { var roles = new List<IRole>(); if (Equals(account.ID, this.UserID)) { roles.Add(Constants.Owner); } return roles; }
public IEnumerable<ASC.Common.Security.Authorizing.IRole> GetObjectRoles(ASC.Common.Security.Authorizing.ISubject account, ISecurityObjectId objectId, SecurityCallContext callContext) { var roles = new List<IRole>(); if (!Guid.Empty.Equals(Object.OwnerID) && Object.OwnerID.Equals(account.ID)) { roles.Add(ASC.Common.Security.Authorizing.Constants.Owner); } return roles; }
public IEnumerable<IRole> GetObjectRoles(ISubject account, ISecurityObjectId objectId, SecurityCallContext callContext) { var roles = new List<IRole>(); var userGroups = new List<GroupInfo>( CoreContext.UserManager.GetUserGroups(account.ID, IncludeType.Distinct | IncludeType.InChild) ); if (userGroups.Contains(groupInfo)) { roles.Add(ASC.Common.Security.Authorizing.Constants.Member); } return roles; }
public IEnumerable<IRole> GetObjectRoles(ISubject account, ISecurityObjectId objectId, SecurityCallContext callContext) { var roles = new List<IRole>(); if (objectId.ObjectType == type1) { if (objectId.SecurityId.Equals(1) && account.Equals(Domain.accountNik)) { roles.Add(Constants.Owner); roles.Add(Constants.Self); } if (objectId.SecurityId.Equals(3) && account.Equals(Domain.accountAnton)) { roles.Add(Constants.Owner); } } return roles; }
/// <inheritdoc/> public IEnumerable<IRole> GetObjectRoles(ISubject account, ISecurityObjectId objectId, SecurityCallContext callContext) { return new IRole[0]; }
public IEnumerable<IRole> GetObjectRoles(ISubject account, ISecurityObjectId objectId, SecurityCallContext callContext) { throw new NotImplementedException(); }
public IEnumerable<IRole> GetObjectRoles(ISubject account, ISecurityObjectId objectId, SecurityCallContext callContext) { var roles = new List<IRole>(); if (account.ID.Equals(PosterID)) roles.Add(Common.Security.Authorizing.Constants.Owner); return roles; }
public IEnumerable<IRole> GetObjectRoles(ASC.Common.Security.Authorizing.ISubject account, ISecurityObjectId objectId, SecurityCallContext callContext) { return account.ID == CreatorID ? new[] { Constants.Owner } : new IRole[0]; }
/// <inheritdoc/> public IEnumerable<IRole> GetObjectRoles(ISubject account, ISecurityObjectId objectId, SecurityCallContext callContext) { List<IRole> roles = new List<IRole>(); if (account.ID.Equals(this.PosterID)) { if (callContext.ObjectsStack == null || callContext.ObjectsStack.Find(so => so.ObjectType.Equals(typeof(Post))) == null) roles.Add(ASC.Common.Security.Authorizing.Constants.Owner); } return roles; }
public IEnumerable<IRole> GetObjectRoles(ISubject account, ISecurityObjectId objectId, SecurityCallContext callContext) { var roles = new List<IRole>(); if (!string.IsNullOrEmpty(this.UserID) && Equals(account.ID, new Guid(UserID))) { roles.Add(Constants.Owner); } return roles; }