| | |
| | | |
| | | import org.opends.server.api.AlertGenerator; |
| | | import org.opends.server.api.Backend; |
| | | import org.opends.server.api.ClientConnection; |
| | | import org.opends.server.api.ConfigurableComponent; |
| | | import org.opends.server.api.MatchingRule; |
| | | import org.opends.server.config.BooleanConfigAttribute; |
| | |
| | | import org.opends.server.types.NameForm; |
| | | import org.opends.server.types.ObjectClass; |
| | | import org.opends.server.types.ObjectClassType; |
| | | import org.opends.server.types.Privilege; |
| | | import org.opends.server.types.RDN; |
| | | import org.opends.server.types.RestoreConfig; |
| | | import org.opends.server.types.ResultCode; |
| | |
| | | String.valueOf(modifyOperation)); |
| | | |
| | | |
| | | // Make sure that the authenticated user has the necessary UPDATE_SCHEMA |
| | | // privilege. |
| | | ClientConnection clientConnection = modifyOperation.getClientConnection(); |
| | | if (! clientConnection.hasPrivilege(Privilege.UPDATE_SCHEMA, |
| | | modifyOperation)) |
| | | { |
| | | int msgID = MSGID_SCHEMA_MODIFY_INSUFFICIENT_PRIVILEGES; |
| | | String message = getMessage(msgID); |
| | | throw new DirectoryException(ResultCode.INSUFFICIENT_ACCESS_RIGHTS, |
| | | message, msgID); |
| | | } |
| | | |
| | | |
| | | |
| | | // At present, we only allow the addition of new attribute types, |
| | | // object classes, name forms, DIT content rules, DIT structure rules, and |
| | | // matching rule uses. We will not support removing or replacing existing |