Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
PERFORMA_REPLICA
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Muhammad Usman
PERFORMA_REPLICA
Commits
3ba39e42
Commit
3ba39e42
authored
Jul 18, 2017
by
Nilu
Committed by
Harsh Shah
Sep 06, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
check user role when login in to admin portal
parent
4ae53b28
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
35 additions
and
1 deletions
+35
-1
UserLoginFP.java
cmsWebApp/src/performa/form/UserLoginFP.java
+34
-0
CustomServlets_adminPortal.xml
...oot/extensions/adminportal/CustomServlets_adminPortal.xml
+1
-1
No files found.
cmsWebApp/src/performa/form/UserLoginFP.java
0 → 100644
View file @
3ba39e42
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package
performa
.
form
;
import
java.util.Map
;
import
oneit.objstore.ObjectTransaction
;
import
oneit.security.LoginProcessor
;
import
oneit.security.SecUser
;
import
oneit.servlets.forms.SubmissionDetails
;
import
oneit.utils.MultiException
;
import
oneit.utils.parsers.FieldException
;
import
performa.utils.Utils
;
/**
*
* @author nilu
*/
public
class
UserLoginFP
extends
LoginProcessor
{
@Override
protected
void
checkUserCanLogin
(
ObjectTransaction
trans
,
SecUser
userToCheck
,
SubmissionDetails
submission
,
Map
requestParams
)
throws
FieldException
,
MultiException
{
super
.
checkUserCanLogin
(
trans
,
userToCheck
,
submission
,
requestParams
);
if
(!
Utils
.
checkAdminPortalAccess
(
userToCheck
))
{
throw
new
FieldException
(
"You're not an authorised user to access admin portal."
,
SecUser
.
FIELD_UserName
);
}
}
}
\ No newline at end of file
cmsWebApp/webroot/extensions/adminportal/CustomServlets_adminPortal.xml
View file @
3ba39e42
...
...
@@ -36,7 +36,7 @@
<NODE
name=
"signin_jsp"
factory=
"Participant"
>
<INHERITS
factory=
"Named"
nodename=
"CoreORMAdminNoPriv"
/>
<FORM
name=
"*.login"
factory=
"Participant"
class=
"
oneit.security.LoginProcessor
"
>
<FORM
name=
"*.login"
factory=
"Participant"
class=
"
performa.form.UserLoginFP
"
>
<NODE
name=
"loginFailureMessage"
factory=
"String"
value=
"Invalid password, please re-check your login details ... "
/>
<NODE
name=
"onSuccessURL"
factory=
"String"
value=
"frame.jsp"
/>
<PARSER
name=
"username"
factory=
"Participant"
class=
"oneit.utils.parsers.StringParser"
>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
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 comment