1 13 package info.magnolia.cms.security; 14 15 import info.magnolia.cms.util.UrlPattern; 16 17 18 22 public interface Permission { 23 24 27 long ADD = 1; 28 29 long SET = 2; 30 31 long REMOVE = 4; 32 33 long READ = 8; 34 35 long EXECUTE = 16; 36 37 long SYNDICATE = 32; 38 39 41 String PERMISSION_NAME_ADD = "Add"; 43 String PERMISSION_NAME_SET = "Set"; 45 String PERMISSION_NAME_REMOVE = "Remove"; 47 String PERMISSION_NAME_READ = "Read"; 49 String PERMISSION_NAME_EXECUTE = "Execute"; 51 String PERMISSION_NAME_SYNDICATE = "Syndicate"; 53 String PERMISSION_NAME_ALL = "(Add, Set, Read, Execute, Syndicate)"; 55 String PERMISSION_NAME_WRITE = "(Add, Set, Read)"; 57 60 long ALL = ADD | REMOVE | SET | READ | EXECUTE | SYNDICATE; 61 62 long WRITE = ADD | SET | READ; 63 64 void setPattern(UrlPattern value); 65 66 UrlPattern getPattern(); 67 68 void setPermissions(long value); 69 70 long getPermissions(); 71 72 boolean match(String path); 73 } 74 | Popular Tags |