public bool Revoke(string clusterName, Common.Security.Impl.ResourceId resourceId, string userName, string roleName) { bool isSuccessful = false; isSuccessful = _session.Revoke(clusterName, resourceId, userName, roleName); return(isSuccessful); }
public bool Revoke(string shardName, Common.Security.Impl.ResourceId resourceId, Common.Security.Interfaces.IUser user, Common.Security.Interfaces.IRole role) { if (ConfigurationServer != null) { return(ConfigurationServer.RevokeRoleOnDatabaseServer(shardName, resourceId, user, role)); } return(true); }
public bool Grant(string shardName, Common.Security.Impl.ResourceId resourceId, Common.Security.Interfaces.IUser user, Common.Security.Interfaces.IRole role) { if (ConfigurationServer != null) { return(ConfigurationServer.GrantRoleOnDatabaseServer(shardName, resourceId, user, role)); } return(true); //returns true as the call was meant to be sent to db server from config server for granting role and it is already on db server }
public bool RevokeRole(string cluster, string shardName, Common.Security.Impl.ResourceId resourceId, Common.Security.Interfaces.IUser userInfo, Common.Security.Interfaces.IRole roleInfo) { ManagementCommand command = GetManagementCommand(ConfigurationCommandUtil.MethodName.Revoke); command.Parameters.AddParameter(cluster); command.Parameters.AddParameter(shardName); command.Parameters.AddParameter(resourceId); command.Parameters.AddParameter(userInfo); command.Parameters.AddParameter(roleInfo); return((bool)ExecuteCommandOnMgtServer(command, true)); }
public bool RevokeRole(string cluster, string shardName, Common.Security.Impl.ResourceId resourceId, Common.Security.Interfaces.IUser userInfo, Common.Security.Interfaces.IRole roleInfo) { try { return(dbMgtServer.RevokeRole(cluster, shardName, resourceId, userInfo, roleInfo)); } catch (System.Exception exc) { throw exc; } }
public bool Grant(string shardName, Common.Security.Impl.ResourceId resourceId, Common.Security.Interfaces.IUser userInfo, Common.Security.Interfaces.IRole roleInfo) { try { if (_configurationSession != null) { return(_configurationSession.Grant(this.ClusterName, resourceId, userInfo.Username, roleInfo.RoleName)); } return(false); } catch (ChannelException) { return(false); } }
public bool IsAuthorized(Common.Security.Interfaces.ISessionId sessionId, Common.Security.Impl.ResourceId resourceId, Common.Security.Impl.ResourceId superResourceId, Common.Security.Impl.Permission operationPermission) { try { if (_configurationSession != null) { resourceId.Name = ClusterName.ToLower() + "/" + resourceId.Name; return(_configurationSession.IsAuthorized(sessionId, resourceId, superResourceId, operationPermission)); } return(false); } catch (ChannelException) { return(false); } }
public bool Revoke(string shardName, Common.Security.Impl.ResourceId resourceId, Common.Security.Interfaces.IUser userInfo, Common.Security.Interfaces.IRole roleInfo) { return(true); }
public bool IsAuthorized(ISessionId sessionId, Common.Security.Impl.ResourceId resourceId, Common.Security.Impl.ResourceId superResourceId, Common.Security.Impl.Permission operationPermission) { return(false); }