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

Method run

basex-core/src/main/java/org/basex/core/cmd/Grant.java:38–57  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

36 }
37
38 @Override
39 protected boolean run() {
40 // find permission
41 final CmdPerm cmd = getOption(CmdPerm.class);
42 final boolean local = args[2].isEmpty();
43 if(cmd == CmdPerm.NONE) {
44 prm = Perm.NONE;
45 } else if(cmd == CmdPerm.READ) {
46 prm = Perm.READ;
47 } else if(cmd == CmdPerm.WRITE) {
48 prm = Perm.WRITE;
49 } else if(cmd == CmdPerm.CREATE && local) {
50 prm = Perm.CREATE;
51 } else if(cmd == CmdPerm.ADMIN && local) {
52 prm = Perm.ADMIN;
53 }
54 if(prm == null) return error(PERM_UNKNOWN_X, args[0]);
55
56 return run(1, false);
57 }
58
59 @Override
60 protected boolean run(final String name, final String db) {

Callers

nothing calls this directly

Calls 7

getMethod · 0.95
permissionMethod · 0.95
getOptionMethod · 0.80
infoMethod · 0.65
isEmptyMethod · 0.45
errorMethod · 0.45
equalsMethod · 0.45

Tested by

no test coverage detected