- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-26-2025 07:59 AM
Hi everyone, Im trying to create an ACL where it will check if the current logged in user "location" has the same value as a custom field "u_site" which is a reference field for the "cmn_location" table. I have tried to do this with an "advanced" ACL, but it is not working, it almost looks like the ACL is not even running. Can anyone help with this please ?
Here is the code that Im using and some printscreens of the ACL:
Code:
(function() {
var userLocation = gs.getUser().getLocationID();
if (!current.u_site && !userLocation) {
return false;
}
if (userLocation != current.u_site) {
return false;
}
/* if (userLocation == current.u_site) {
answer = true;
}*/
return current.u_site == userLocation;
})();
Prints:
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-26-2025 09:35 AM
Hi @F_bio Santos ,
this one line is enough
current.getValue('u_site') && gs.getUser().getLocation().toString() == current.getValue('u_site');
Please mark my answer as helpful/correct if it resolves your query.
Regards,
Chaitanya
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-26-2025 09:44 AM
check if you have added any roles in the ACL
or check if there any security attributes
does that user has the ACL specified role or meet the security attribute criteria?
Please mark my answer as helpful/correct if it resolves your query.
Regards,
Chaitanya