MCPcopy Create free account
hub / github.com/BaseXdb/basex / info

Method info

basex-core/src/main/java/org/basex/core/users/Users.java:180–189  ·  view source on GitHub ↗

Returns a table with all users, or users from a specific database. The list will only contain the current user if no admin permissions are available. @param db database (can be null) @param ctx database context @return user information

(final String db, final Context ctx)

Source from the content-addressed store, hash-verified

178 * @return user information
179 */
180 public synchronized Table info(final String db, final Context ctx) {
181 final Table table = new Table();
182 table.description = Text.USERS_X;
183
184 for(final String user : S_USERINFO) table.header.add(user);
185 for(final User user : users(db, ctx)) {
186 table.contents.add(new TokenList().add(user.name()).add(user.permission(db).toString()));
187 }
188 return table.sort().toTop(token(ADMIN));
189 }
190
191 /**
192 * Returns all users, or users that have permissions for a specific database.

Callers

nothing calls this directly

Calls 10

usersMethod · 0.95
sortMethod · 0.95
permissionMethod · 0.80
toTopMethod · 0.80
addMethod · 0.65
nameMethod · 0.65
toStringMethod · 0.65
tokenMethod · 0.65
hasChildrenMethod · 0.45
hasAttributesMethod · 0.45

Tested by

no test coverage detected