Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
Linnea Samila
/
Moya
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 3b58dba8
authored
Apr 02, 2011
by
Tuomas Riihimäki
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Permission and RolePermission changes
1 parent
9ca7ef64
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
7 deletions
code/LanBortalUtilities/src/fi/insomnia/bortal/enums/Permission.java
code/LanBortalUtilities/src/fi/insomnia/bortal/enums/RolePermission.java
code/LanBortalUtilities/src/fi/insomnia/bortal/enums/Permission.java
View file @
3b58dba
...
@@ -15,19 +15,22 @@ public enum Permission {
...
@@ -15,19 +15,22 @@ public enum Permission {
// NOTE. add conversion Value to RoleRight
// NOTE. add conversion Value to RoleRight
// PERMISSION("Description"),
// PERMISSION("Description"),
LOGIN
(
"User can see loginbutton(r), create new user(w
)"
),
LOGIN
(
"User can see loginbutton(r), create new user(w), invite others (x
)"
),
USER_MANAGEMENT
(
"User has right to v
iew all users(r), modify users(w), execute actions for user(x) "
),
USER_MANAGEMENT
(
"V
iew all users(r), modify users(w), execute actions for user(x) "
),
ACCOUNT_MANAGEMENT
(
"Manage users account events. view(r), modify(w) and create
(x)"
),
ACCOUNT_MANAGEMENT
(
"Manage others account events. view(r), modify(w) and create (shop)
(x)"
),
BILL
(
"View bills(r), Mark paid & modify(w), and create (buy)
bills (x)"
),
BILL
(
"View all bills(r), Mark paid & modify(w), and create own
bills (x)"
),
MAP
(
"view maps(r), Modify(w), reserve places from maps(x)"
),
MAP
(
"view maps(r), Modify(w), reserve places from maps(x)"
),
ROLE_MANAGEMENT
(
"User has right to view(r), modify(w) and assign(x) roles"
),
ROLE_MANAGEMENT
(
"User has right to view(r), modify(w) and assign(x) roles"
),
PRODUCT
(
"View(r), modify(w), and shop(x) products"
),
PRODUCT
(
"View(r), modify(w), and shop(x) products"
),
SHOP
(
"View shopped events(r), Modify
AccountEvents() and Shop(x)"
),
SHOP
(
"View own shopped events(r), Modify own
AccountEvents() and Shop(x)"
),
GAME
(
"View(r) own, write(w) modify
, view all(X)"
),
GAME
(
"View(r) own, modify(w)
, view all(X)"
),
POLL
(
"View answers(r), create (w) and answer(x) to polls
"
);
POLL
(
"View answers(r), create polls (w), answer to polls(x)
"
);
private
String
description
;
private
String
description
;
private
static
final
Logger
logger
=
LoggerFactory
.
getLogger
(
Permission
.
class
);
private
static
final
Logger
logger
=
LoggerFactory
.
getLogger
(
Permission
.
class
);
public
static
final
String
EXECUTE
=
"/EXECUTE"
;
public
static
final
String
READ
=
"/READ"
;
public
static
final
String
WRITE
=
"/WRITE"
;
public
static
Permission
getPermission
(
String
name
)
{
public
static
Permission
getPermission
(
String
name
)
{
if
(
name
==
null
||
name
.
isEmpty
())
{
if
(
name
==
null
||
name
.
isEmpty
())
{
...
@@ -58,4 +61,8 @@ public enum Permission {
...
@@ -58,4 +61,8 @@ public enum Permission {
public
String
getDescription
()
{
public
String
getDescription
()
{
return
description
;
return
description
;
}
}
public
String
append
(
RolePermission
permission
)
{
return
name
()
+
"/"
+
permission
.
name
();
}
}
}
code/LanBortalUtilities/src/fi/insomnia/bortal/enums/RolePermission.java
View file @
3b58dba
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment