/// <summary> /// Sets whether the given role are allowed to write this object. /// </summary> /// <param name="role">The role.</param> /// <param name="value">Whether the role has access.</param> public void SetRoleWriteAccess(LCRole role, bool value) { if (role == null) { throw new ArgumentNullException(nameof(role)); } string roleKey = $"{RoleKeyPrefix}{role.Name}"; SetAccess(WriteAccess, roleKey, value); }
public void SetRoleReadAccess(LCRole role, bool value) { if (role == null) { throw new ArgumentNullException(nameof(role)); } string roleKey = $"{RoleKeyPrefix}{role.ObjectId}"; SetAccess(readers, roleKey, value); }
/// <summary> /// Detects whether the given role are allowed to write this object. /// </summary> /// <param name="role">The role to check.</param> /// <returns></returns> public bool GetRoleWriteAccess(LCRole role) { if (role == null) { throw new ArgumentNullException(nameof(role)); } string roleKey = $"{RoleKeyPrefix}{role.Name}"; return(GetAccess(WriteAccess, roleKey)); }
public bool GetRoleReadAccess(LCRole role) { if (role == null) { throw new ArgumentNullException(nameof(role)); } string roleKey = $"{RoleKeyPrefix}{role.ObjectId}"; return(GetAccess(readers, roleKey)); }