1 package com.srv4pos.server.api.auth; 2 3 /** 4 * The roles of users. Each user has one role. 5 * 6 * <p>User: slix, Date: 27.04.2014 13:51</p> 7 */ 8 public enum UserRole { 9 /** 10 * Can do anything. 11 */ 12 ROLE_HYPER_ADMIN, 13 /** 14 * Edit seller and seller data, who have at least one activation for his software vendor. Manage activations requested trough it's software and activate 15 * them. Activation has field activationPackages which identifies the software. 16 */ 17 ROLE_SOFTWARE_VENDOR_ADMIN, 18 /** 19 * Run only PosPlusController#kd. 20 */ 21 ROLE_REGULAR_USER; 22 23 public boolean hasAuthorityOn(UserRole userRole) { 24 return compareTo(userRole) <= 0; 25 } 26 }