Project

General

Profile

1
package eu.dnetlib.administration.uis.annotations;
2

    
3
import java.util.HashMap;
4
import java.util.Map;
5

    
6
public enum PermissionLevel {
7
	SUPER_ADMIN("super admin", "Authenticated user with ALL management rights"), DS_ADMIN("datasource administrator",
8
			"Authenticated user that can manage datasources"), WF_ADMIN("workflow administrator", "Authenticated user that can manage workflows"), IS_ADMIN(
9
					"information administrator", "Authenticated user that can update IS profiles"), USER("simple user",
10
							"Authenticated user with no management rights"), GUEST("guest", "Anonymous user");
11

    
12
	private String label;
13
	private String details;
14

    
15
	private PermissionLevel(final String label, final String details) {
16
		this.label = label;
17
		this.details = details;
18
	}
19

    
20
	public String getLabel() {
21
		return label;
22
	}
23

    
24
	public String getDetails() {
25
		return details;
26
	}
27

    
28
	public Map<String, String> asMap() {
29
		final Map<String, String> m = new HashMap<>();
30
		m.put("level", name());
31
		m.put("label", label);
32
		m.put("details", details);
33
		return m;
34
	}
35

    
36
}
(4-4/4)