@@ -215,8 +215,8 @@ public Boolean drop() throws ArangoDBException {
215
215
}
216
216
217
217
/**
218
- * Grants or revoke access to the database for user user. You need permission to the _system database in order to
219
- * execute this call.
218
+ * Grants or revoke access to the database for user <code> user</code> . You need permission to the _system database
219
+ * in order to execute this call.
220
220
*
221
221
* @see <a href= "https://docs.arangodb.com/current/HTTP/UserManagement/index.html#grant-or-revoke-database-access">
222
222
* API Documentation</a>
@@ -231,8 +231,8 @@ public void grantAccess(final String user, final Permissions permissions) throws
231
231
}
232
232
233
233
/**
234
- * Grants access to the database for user user. You need permission to the _system database in order to execute this
235
- * call.
234
+ * Grants access to the database for user <code> user</code> . You need permission to the _system database in order to
235
+ * execute this call.
236
236
*
237
237
* @see <a href= "https://docs.arangodb.com/current/HTTP/UserManagement/index.html#grant-or-revoke-database-access">
238
238
* API Documentation</a>
@@ -245,8 +245,8 @@ public void grantAccess(final String user) throws ArangoDBException {
245
245
}
246
246
247
247
/**
248
- * Revokes access to the database dbname for user user. You need permission to the _system database in order to
249
- * execute this call.
248
+ * Revokes access to the database dbname for user <code> user</code> . You need permission to the _system database in
249
+ * order to execute this call.
250
250
*
251
251
* @see <a href= "https://docs.arangodb.com/current/HTTP/UserManagement/index.html#grant-or-revoke-database-access">
252
252
* API Documentation</a>
@@ -265,16 +265,59 @@ public void revokeAccess(final String user) throws ArangoDBException {
265
265
* API Documentation</a>
266
266
* @param user
267
267
* The name of the user
268
+ * @since ArangoDB 3.2.0
268
269
* @throws ArangoDBException
269
270
*/
270
271
public void resetAccess (final String user ) throws ArangoDBException {
271
272
executor .execute (resetAccessRequest (user ), Void .class );
272
273
}
273
274
274
- public void updateUserDefaultCollectionAccess (final String user , final Permissions permissions ) {
275
+ /**
276
+ * Sets the default access level for collections within this database for the user <code>user</code>. You need
277
+ * permission to the _system database in order to execute this call.
278
+ *
279
+ * @param user
280
+ * The name of the user
281
+ * @param permissions
282
+ * The permissions the user grant
283
+ * @since ArangoDB 3.2.0
284
+ * @throws ArangoDBException
285
+ */
286
+ public void grantDefaultCollectionAccess (final String user , final Permissions permissions )
287
+ throws ArangoDBException {
288
+ executor .execute (updateUserDefaultCollectionAccessRequest (user , permissions ), Void .class );
289
+ }
290
+
291
+ /**
292
+ * @deprecated use {@link #grantDefaultCollectionAccess(String, Permissions)} instead
293
+ * @param user
294
+ * The name of the user
295
+ * @param permissions
296
+ * The permissions the user grant
297
+ * @since ArangoDB 3.2.0
298
+ * @throws ArangoDBException
299
+ */
300
+ @ Deprecated
301
+ public void updateUserDefaultCollectionAccess (final String user , final Permissions permissions )
302
+ throws ArangoDBException {
275
303
executor .execute (updateUserDefaultCollectionAccessRequest (user , permissions ), Void .class );
276
304
}
277
305
306
+ /**
307
+ * Get specific database access level
308
+ *
309
+ * @see <a href= "https://docs.arangodb.com/current/HTTP/UserManagement/#get-the-database-access-level"> API
310
+ * Documentation</a>
311
+ * @param user
312
+ * The name of the user
313
+ * @return permissions of the user
314
+ * @since ArangoDB 3.2.0
315
+ * @throws ArangoDBException
316
+ */
317
+ public Permissions getPermissions (final String user ) throws ArangoDBException {
318
+ return executor .execute (getPermissionsRequest (user ), getPermissionsResponseDeserialzer ());
319
+ }
320
+
278
321
/**
279
322
* Create a cursor and return the first results
280
323
*
0 commit comments