Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
Max Mecklin
/
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 775eeb93
authored
Feb 28, 2014
by
Tuukka Kivilahti
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
permissions for moyaterminalweb, now there is examble of how we do basic permissions in there
1 parent
4084aa93
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
50 additions
and
11 deletions
code/MoyaBeans/ejbModule/fi/codecrew/moya/beans/PermissionBean.java
code/MoyaTerminalWeb/WebContent/WEB-INF/web.xml
code/MoyaUtilities/src/main/java/fi/codecrew/moya/enums/apps/TerminalPermission.java
code/MoyaBeans/ejbModule/fi/codecrew/moya/beans/PermissionBean.java
View file @
775eeb9
...
@@ -81,9 +81,9 @@ import fi.codecrew.moya.model.User;
...
@@ -81,9 +81,9 @@ import fi.codecrew.moya.model.User;
SpecialPermission
.
S_USER
,
SpecialPermission
.
S_USER
,
SpecialPermission
.
S_ANONYMOUS
,
SpecialPermission
.
S_ANONYMOUS
,
TerminalPermission
.
S_
CASHIER
_TERMINAL
,
TerminalPermission
.
S_
INFO
_TERMINAL
,
TerminalPermission
.
S_
CUSTOM
ER_TERMINAL
,
TerminalPermission
.
S_
US
ER_TERMINAL
,
TerminalPermission
.
S_
SELFHELP
_TERMINAL
,
TerminalPermission
.
S_
ADMIN
_TERMINAL
,
CompoPermission
.
S_MANAGE
,
CompoPermission
.
S_MANAGE
,
CompoPermission
.
S_VOTE
,
CompoPermission
.
S_VOTE
,
...
...
code/MoyaTerminalWeb/WebContent/WEB-INF/web.xml
View file @
775eeb9
...
@@ -5,10 +5,12 @@
...
@@ -5,10 +5,12 @@
<param-name>
javax.faces.FACELETS_SKIP_COMMENTS
</param-name>
<param-name>
javax.faces.FACELETS_SKIP_COMMENTS
</param-name>
<param-value>
true
</param-value>
<param-value>
true
</param-value>
</context-param>
</context-param>
<welcome-file-list>
<welcome-file-list>
<welcome-file>
index.html
</welcome-file>
<welcome-file>
index.html
</welcome-file>
<welcome-file>
index.jsf
</welcome-file>
<welcome-file>
index.jsf
</welcome-file>
</welcome-file-list>
</welcome-file-list>
<session-config>
<session-config>
<session-timeout>
30
</session-timeout>
<session-timeout>
30
</session-timeout>
</session-config>
</session-config>
...
@@ -17,11 +19,12 @@
...
@@ -17,11 +19,12 @@
<servlet-class>
javax.faces.webapp.FacesServlet
</servlet-class>
<servlet-class>
javax.faces.webapp.FacesServlet
</servlet-class>
<load-on-startup>
1
</load-on-startup>
<load-on-startup>
1
</load-on-startup>
</servlet>
</servlet>
<servlet-mapping>
<servlet-mapping>
<servlet-name>
Faces Servlet
</servlet-name>
<servlet-name>
Faces Servlet
</servlet-name>
<url-pattern>
*.jsf
</url-pattern>
<url-pattern>
*.jsf
</url-pattern>
<url-pattern>
/faces/*
</url-pattern>
</servlet-mapping>
</servlet-mapping>
<context-param>
<context-param>
<param-name>
javax.faces.PROJECT_STAGE
</param-name>
<param-name>
javax.faces.PROJECT_STAGE
</param-name>
<param-value>
Development
</param-value>
<param-value>
Development
</param-value>
...
@@ -47,6 +50,40 @@
...
@@ -47,6 +50,40 @@
<auth-method>
CLIENT-CERT
</auth-method>
<auth-method>
CLIENT-CERT
</auth-method>
<realm-name>
certificate
</realm-name>
<realm-name>
certificate
</realm-name>
</login-config>
</login-config>
<security-constraint>
<display-name>
Forbidden resource
</display-name>
<web-resource-collection>
<web-resource-name>
Forbidden
</web-resource-name>
<url-pattern>
*.xhtml
</url-pattern>
<url-pattern>
/layout/*
</url-pattern>
<url-pattern>
/resources/tools/*
</url-pattern>
</web-resource-collection>
<auth-constraint>
<description>
Thou shall not read the sources or use utils directly
</description>
</auth-constraint>
<user-data-constraint>
<transport-guarantee>
CONFIDENTIAL
</transport-guarantee>
</user-data-constraint>
</security-constraint>
<security-constraint>
<display-name>
Resource that needs cert auth
</display-name>
<web-resource-collection>
<web-resource-name>
Forbidden
</web-resource-name>
<url-pattern>
/info/*
</url-pattern>
</web-resource-collection>
<auth-constraint>
<role-name>
TERMINAL/INFO
</role-name>
</auth-constraint>
<user-data-constraint>
<transport-guarantee>
CONFIDENTIAL
</transport-guarantee>
</user-data-constraint>
</security-constraint>
<!--
<security-constraint>
<security-constraint>
<display-name>Resource that needs cert auth</display-name>
<display-name>Resource that needs cert auth</display-name>
<web-resource-collection>
<web-resource-collection>
...
@@ -60,7 +97,9 @@
...
@@ -60,7 +97,9 @@
<user-data-constraint>
<user-data-constraint>
<transport-guarantee>CONFIDENTIAL</transport-guarantee>
<transport-guarantee>CONFIDENTIAL</transport-guarantee>
</user-data-constraint>
</user-data-constraint>
</security-constraint>
</security-constraint> -->
<persistence-unit-ref>
<persistence-unit-ref>
<persistence-unit-ref-name>
BortalEMF
</persistence-unit-ref-name>
<persistence-unit-ref-name>
BortalEMF
</persistence-unit-ref-name>
</persistence-unit-ref>
</persistence-unit-ref>
...
...
code/MoyaUtilities/src/main/java/fi/codecrew/moya/enums/apps/TerminalPermission.java
View file @
775eeb9
...
@@ -11,16 +11,16 @@ import fi.codecrew.moya.enums.BortalApplication;
...
@@ -11,16 +11,16 @@ import fi.codecrew.moya.enums.BortalApplication;
*/
*/
public
enum
TerminalPermission
implements
IAppPermission
{
public
enum
TerminalPermission
implements
IAppPermission
{
CASHIER
,
// ("Access cashier terminal functions")
,
INFO
,
CUSTOMER
,
// ("Access client terminal functions"),
USER
,
SELFHELP
,
// ("Self help terminal")
ADMIN
,
;
;
// public static final String S_TERMINAL = "TERMINAL";
// public static final String S_TERMINAL = "TERMINAL";
public
static
final
String
S_
CASHIER_TERMINAL
=
"TERMINAL/CASHIER
"
;
public
static
final
String
S_
INFO_TERMINAL
=
"TERMINAL/INFO
"
;
public
static
final
String
S_
CUSTOMER_TERMINAL
=
"TERMINAL/CUSTOM
ER"
;
public
static
final
String
S_
USER_TERMINAL
=
"TERMINAL/US
ER"
;
public
static
final
String
S_
SELFHELP_TERMINAL
=
"TERMINAL/SELFHELP
"
;
public
static
final
String
S_
ADMIN_TERMINAL
=
"TERMINAL/ADMIN
"
;
private
final
String
fullName
;
private
final
String
fullName
;
private
final
String
key
;
private
final
String
key
;
...
...
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