protected override void ExecuteStatement(ExecutionContext context)
{
if (!context.DirectAccess.RoleExists(RoleName))
throw new StatementException(String.Format("The role '{0}' does not exist", RoleName));
if (!context.DirectAccess.UserExists(Grantee) &&
!context.DirectAccess.RoleExists(Grantee))
throw new StatementException(String.Format("User or role '{0}' does not exist.", Grantee));
if (!context.User.CanRevokeRole(RoleName))
throw new SecurityException(String.Format("User '{0}' has no role rights to revoke role '{1}' from '{2'}'.",
context.User.Name, RoleName, Grantee));
if (Admin) {
// TODO:
throw new NotImplementedException();
}
context.DirectAccess.RemoveUserFromRole(Grantee, RoleName);
}