Feature #19954
ACL Function and System
Status: | Resolved | Start date: | 01 March 2024 | |
---|---|---|---|---|
Priority: | Normal | Due date: | ||
Assignee: | chok yee fan | % Done: | 100% | |
Category: | - | Spent time: | - | |
Target version: | - |
Description
Prepare Web service for ACL to be pass to front end :
2 ws in the acl
- ACL Function
- ACL System
History
#1 Updated by Farid Nazmi 10 months ago
- Status changed from New to In Progress
- % Done changed from 0 to 50
ACL Function List Web Service
https://dev.silverlakemobility.com/gitlab/mleb-solution-domain/smesd100/mleb-iam/-/commit/d4ea881636c8c93244a70767f426427061aad904
WS Name : getACLFunctionAction
api path : /api/ACL/getACLFunctionAction
req body: {}
resp body :
{
"responseTimestamp": "2024-03-01T11:11:49.505+08:00",
"headerBean": null,
"responseCode": "00300",
"responseMessage": "Success OK.",
"sessionID": null,
"tranxID": "25798151",
"bdResponseCode": null,
"bdResponseMessage": null,
"aclBean": null,
"aclsystemList": null,
"aclfunctionList": [
"FUNC_GET_COUNTRY",
"FUNC_LIST_COUNTRY",
"FUNC_SAVE_COUNTRY",
"FUNC_SAVE_UPDATE_COUNTRY"
],
"bdobject": null
}
#2 Updated by Farid Nazmi 10 months ago
- % Done changed from 50 to 100
ACL System List Web Service
WS Name : getACLSystemAction
api path : /api/ACL/getACLSystemAction
req body: {}
resp body:
{
"responseTimestamp": "2024-03-01T10:47:44.302+08:00",
"headerBean": null,
"responseCode": "00300",
"responseMessage": "Success OK.",
"sessionID": null,
"tranxID": "62028629",
"bdResponseCode": null,
"bdResponseMessage": null,
"aclBean": null,
"aclsystemList": [
"MLEB_AM",
"MLEB_COMMON",
"MLEB_IAM",
"MLEB_MAM"
],
"aclfunctionList": null,
"bdobject": null
}
#3 Updated by Farid Nazmi 10 months ago
- Assignee changed from Farid Nazmi to Amirul Umar Pandai
#4 Updated by Farid Nazmi 10 months ago
to test the ACL WS in your local,
you will need to setup adding data first in:
1. user system ( details info is below this chat).
2. user role (adding role name to be used in the urf request body)
3. user role function ( can use the screen if already implemented/ use ws) :
- first use saveFunctionCodeTempAction and then saveFunctionCodeAction
- the role name need to input the same as what you have in the user role table
*Notes: make sure your user profile local data has your current keycloak login.
#5 Updated by Farid Nazmi 10 months ago
Here are the details step
1. adding user system assignment ( user system data )
ws : api/mlebSystemWs/saveUserSystemAssigmentAction
req body :
{
"mlebSystemEntity": {
"systemCode": "MLEB_MAM",
"status": "A"
},
"userProfileBean": {
"userId": "sysuser",
"effectiveDate": null,
"expiryDate": null,
"selected" : true
}
}
resp body :
{
"responseTimestamp": "2024-03-05T16:49:30.091+08:00",
"headerBean": null,
"responseCode": "00300",
"responseMessage": "Success OK.",
"sessionID": null,
"tranxID": "68542567",
"bdResponseCode": null,
"bdResponseMessage": null,
"mlebSystemBean": null,
"mlebSystemEntity": {
"systemCode": "MLEB_MAM",
"systemName": null,
"systemGroupCode": null,
"path": null,
"rootContext": null,
"iconPath": null,
"cssIcon": null,
"sequence": null,
"toDisplay": null,
"status": "A",
"createDt": null,
"createBy": null,
"modifyDt": null,
"modifyBy": null,
"mlebSystemGroupEntity": null,
"svgIcon": null
},
"statusSelectItems": null,
"userProfileSearchParamBean": null,
"orgProfileHierarchyBean": null,
"userProfileBean": null,
"bdobject": null
}
#6 Updated by Farid Nazmi 10 months ago
2. adding user role
ws name : createAction
api path : /api/userRoleWs/createAction
req body :
{
"userRoleEntity": {
"systemCode": "MLEB_IAM",
"userRoleName": "Pegawai testingggggghgfdfghjkhgfg",
"userRoleDesc": "Memantau",
"status": "A"
},
"userRoleBean": {
"orgId": 1
}
}
resp body :
{
"responseTimestamp": "2024-03-07T10:45:34.543+08:00",
"headerBean": {
"serviceID": "FUNC_SAVE_USER_ROLE",
"requestInfo": null,
"bdvmurl": null,
"bddispatchURL": null
},
"responseCode": "00300",
"responseMessage": "Success OK.",
"sessionID": null,
"tranxID": "40481438",
"bdResponseCode": null,
"bdResponseMessage": null,
"userRoleBean": {
"mandatoryFields": [
"systemCode",
"userRoleName",
"userRoleDesc",
"status"
],
"infoMessages": [],
"errorMessages": [],
"warnMessages": [],
"userRoleName": null,
"userId": null,
"orgName": null,
"orgId": 1,
"systemName": null,
"systemCode": null,
"status": null,
"functionCode": null,
"selected": null
},
"userRoleEntity": {
"userRoleName": "Pegawai testingggggghgfdfghjkhgfg",
"systemCode": "MLEB_IAM",
"userRoleDesc": "Memantau",
"status": "A",
"createDt": "2024-03-07T10:45:34.584+08:00",
"createBy": "sysuser",
"modifyDt": null,
"modifyBy": null,
"orgId": 1,
"mlebSystemEntity": null,
"userRoleFunctionEntity": null,
"statusLabel": "Active"
},
"mlebSystemSelectItems": [
{
"key": "MLEB_COMMON",
"value": "General"
},
{
"key": "MLEB_MAM",
"value": "Mobile Application Management"
},
{
"key": "MLEB_CHATBOT",
"value": "Chatbot"
},
{
"key": "MLEB_IAM",
"value": "Administration"
},
{
"key": "MLEB_AM",
"value": "Alert Messaging"
}
],
"userCategorySelectItems": [
{
"key": 3,
"value": "Public"
},
{
"key": 4,
"value": "System tester"
},
{
"key": 1,
"value": "System"
},
{
"key": 2,
"value": "Partner"
}
],
"orgProfileSelectItems": [
{
"key": 1,
"value": "Level 1.3"
}
],
"departmentSelectItems": null,
"statusSelectItems": [
{
"key": "A",
"value": "Active"
},
{
"key": "X",
"value": "Inactive"
},
{
"key": "D",
"value": "Pending Deletion"
}
],
"userRoleFunctionBeanList": null,
"userProfileSearchParamBean": null,
"orgProfileHierarchyBean": null,
"mlebFunctionGroupBeans": null,
"genericTreeFactory": null,
"bdobject": null
}
#7 Updated by Farid Nazmi 10 months ago
3. assigning user role function
a) saving to urf temp table
web service for check/uncheck action (checkbox live fire)
ws name : saveFunctionCodeTempAction
api path : /api/userRoleWs/saveFunctionCodeTempAction
req body :
{
"userRoleFunctionBean": {
"userRoleName" : "Pegawai",
"selected": true,
"functionCode": "FUNC_SAVE_UPDATE_COUNTRY",
"orgId": 1
}
}
resp body :
{
"responseTimestamp": "2024-02-29T17:45:51.755+08:00",
"headerBean": null,
"responseCode": "00300",
"responseMessage": "Success OK.",
"sessionID": null,
"tranxID": "65622952",
"bdResponseCode": null,
"bdResponseMessage": null,
"userRoleFunctionTempEntity": null,
"userRoleFunctionEntity": null,
"userRoleFunctionBean": {
"mandatoryFields": [],
"infoMessages": [],
"errorMessages": [],
"warnMessages": [],
"userId": null,
"userRoleName": "Pegawai",
"orgName": null,
"orgId": 1,
"systemName": null,
"systemCode": null,
"functionCode": "FUNC_SAVE_UPDATE_COUNTRY",
"selected": true,
"mlebFunctionEntity": null,
"pk": null,
"name": null,
"status": null,
"parent": null,
"child": null,
"level": null,
"sublist": []
},
"bdobject": null
}
b) saving to original urf table
web services for save button ( final save into original user role function table )
ws name : saveFunctionCodeAction
api path : /api/userRoleWs/saveFunctionCodeAction
req body :
{
"userRoleFunctionTempEntity" : {
}
}
*Notes : the request body is blank because it already get from the security utils in the backend once login , no need to input
resp body:
{
"responseTimestamp": "2024-02-29T17:46:01.694+08:00",
"headerBean": null,
"responseCode": "00300",
"responseMessage": "Success OK.",
"sessionID": null,
"tranxID": "13955704",
"bdResponseCode": null,
"bdResponseMessage": null,
"userRoleFunctionTempEntity": {
"userRoleFunctionId": 74,
"userRoleName": "Pegawai",
"functionCode": "FUNC_SAVE_UPDATE_COUNTRY",
"orgId": 1,
"status": "A",
"createDt": "2024-02-29T17:45:51.755+08:00",
"createBy": "sysuser",
"modifyDt": null,
"modifyBy": null,
"userId": "sysuser",
"mlebFunctionEntity": null
},
"userRoleFunctionEntity": null,
"userRoleFunctionBean": null,
"bdobject": null
}
#8 Updated by Farid Nazmi 10 months ago
4. assigning user access role
ws name : saveUserAccessRoleAction
api path : /api/userRoleWs/saveUserAccessRoleAction
req body :
{
"userRoleBean" : {
"userRoleName" : "Pegawai",
"userId" : "sysuser",
"status" : "A",
"selected" : true
}
}
resp body :
{
"responseTimestamp": "2024-03-07T10:29:44.739+08:00",
"headerBean": null,
"responseCode": "00300",
"responseMessage": "Success OK.",
"sessionID": null,
"tranxID": "53762343",
"bdResponseCode": null,
"bdResponseMessage": null,
"userRoleBean": {
"mandatoryFields": [],
"infoMessages": [],
"errorMessages": [],
"warnMessages": [],
"userRoleName": "Pegawai",
"userId": "sysuser",
"orgName": null,
"orgId": null,
"systemName": null,
"systemCode": null,
"status": "A",
"functionCode": null,
"selected": true
},
"userRoleEntity": null,
"mlebSystemSelectItems": null,
"userCategorySelectItems": null,
"orgProfileSelectItems": null,
"departmentSelectItems": null,
"statusSelectItems": null,
"userRoleFunctionBeanList": null,
"userProfileSearchParamBean": null,
"orgProfileHierarchyBean": null,
"mlebFunctionGroupBeans": null,
"genericTreeFactory": null,
"bdobject": null
}
#9 Updated by Amirul Umar Pandai 10 months ago
- Status changed from In Progress to Resolved
- Assignee changed from Amirul Umar Pandai to Hazimi Muhammad
Please follow the steps in the updated READMEs to unlock permissions for all systems (MLEB_IAM, MLEB_COMMON, MLEB_AM) and functions (view org profile, modify department, add user profile, etc.)
cc_core
- integrate ACL into cc_topnavbar
- update README to include steps to add user systems inside cc_topnavbar
https://dev.silverlakemobility.com/gitlab/mleb-solution-domain/smesd100/mleb-core/-/commit/cc5fa4dc8bdfd332226f67308d96bec1b4edfa5e
cc_iam
Use new acl instance (refer to latest README)
https://dev.silverlakemobility.com/gitlab/mleb-solution-domain/smesd100/mleb-iam/-/commit/e86cce4dd50f2027fb9a2bdfe2088d76883e7bc0
cc_common
Use new acl instance (refer to latest README)
https://dev.silverlakemobility.com/gitlab/mleb-solution-domain/smesd100/mleb-common/-/commit/3fc7d8e1d5ca56fb60a2d35991bc1862a117704e
#10 Updated by Hazimi Muhammad 10 months ago
- Assignee changed from Hazimi Muhammad to chok yee fan