@@ -2,6 +2,8 @@ package info.bukova.isspst.data;
|
||||
|
||||
import javax.persistence.Column;
|
||||
import javax.persistence.Entity;
|
||||
import javax.persistence.EnumType;
|
||||
import javax.persistence.Enumerated;
|
||||
import javax.persistence.Table;
|
||||
|
||||
import org.springframework.security.core.GrantedAuthority;
|
||||
@@ -21,15 +23,33 @@ public class Permission extends BaseSimpleData implements GrantedAuthority {
|
||||
private String description;
|
||||
@Column(name="MODULE")
|
||||
private String module;
|
||||
@Column(name = "TYPE")
|
||||
@Enumerated(EnumType.ORDINAL)
|
||||
private PermissionType type;
|
||||
|
||||
public Permission(String authority, String description) {
|
||||
this();
|
||||
this.authority = authority;
|
||||
this.description = description;
|
||||
this.module = "";
|
||||
}
|
||||
|
||||
public Permission(String authority, String description, String module) {
|
||||
this(authority, description);
|
||||
this.module = module;
|
||||
}
|
||||
|
||||
public Permission(String authority, String description, PermissionType type) {
|
||||
this(authority, description, "", type);
|
||||
}
|
||||
|
||||
public Permission(String authority, String description, String module, PermissionType type) {
|
||||
this(authority, description, module);
|
||||
this.type = type;
|
||||
}
|
||||
|
||||
public Permission() {
|
||||
|
||||
type = PermissionType.GLOBAL;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user