Added create_index as a separate index privilege

Closes elastic/elasticsearch#53

Original commit: elastic/x-pack-elasticsearch@ec7f6ce5fa
This commit is contained in:
uboness 2014-08-31 23:31:16 +02:00
parent 956aeb53f4
commit fd568037bb
1 changed files with 15 additions and 14 deletions

View File

@ -77,6 +77,7 @@ public abstract class Privilege<P extends Privilege<P>> {
public static final Index NONE = new Index(Name.NONE, BasicAutomata.makeEmpty()); public static final Index NONE = new Index(Name.NONE, BasicAutomata.makeEmpty());
public static final Index ALL = new Index(Name.ALL, "indices:.*"); public static final Index ALL = new Index(Name.ALL, "indices:.*");
public static final Index MANAGE = new Index("manage", "indices:monitor/.*", "indices:admin/.*"); public static final Index MANAGE = new Index("manage", "indices:monitor/.*", "indices:admin/.*");
public static final Index CREATE_INDEX = new Index("create_index", "indices:admin/create");
public static final Index MONITOR = new Index("monitor", "indices:monitor/.*"); public static final Index MONITOR = new Index("monitor", "indices:monitor/.*");
public static final Index DATA_ACCESS = new Index("data_access", "indices:data/.*"); public static final Index DATA_ACCESS = new Index("data_access", "indices:data/.*");
public static final Index CRUD = new Index("crud", "indices:data/write/.*", "indices:data/read/.*"); public static final Index CRUD = new Index("crud", "indices:data/write/.*", "indices:data/read/.*");
@ -89,7 +90,7 @@ public abstract class Privilege<P extends Privilege<P>> {
public static final Index BENCHMARK = new Index("benchmark", "indices:data/benchmark"); public static final Index BENCHMARK = new Index("benchmark", "indices:data/benchmark");
private static final Index[] values = new Index[] { private static final Index[] values = new Index[] {
NONE, ALL, MANAGE, MONITOR, DATA_ACCESS, CRUD, READ, SEARCH, GET, INDEX, DELETE, WRITE, BENCHMARK NONE, ALL, MANAGE, CREATE_INDEX, MONITOR, DATA_ACCESS, CRUD, READ, SEARCH, GET, INDEX, DELETE, WRITE, BENCHMARK
}; };
static Index[] values() { static Index[] values() {