Skip to content
This repository was archived by the owner on Apr 21, 2026. It is now read-only.

Commit 203758a

Browse files
bpamiriclaude
andcommitted
fix: Remove lCase() from checkRoleAccess controller name
CockroachDB does case-sensitive string comparisons. The lCase() call converted controller names to lowercase (e.g., 'usercontroller') but permissions are stored in PascalCase (e.g., 'UserController'), causing the permission query to always return 0 results and block all access. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent eee7a21 commit 203758a

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

app/controllers/Controller.cfc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ component extends="wheels.Controller" {
6060
}
6161

6262
function checkRoleAccess(){
63-
var controller = lCase(listLast(request.wheels.params.controller, "."));
63+
var controller = listLast(request.wheels.params.controller, ".");
6464
var action = request.wheels.params.action;
6565
var accesspermission = model("RolePermission").findAll(
6666
select="roleId, permissionId, name, permissionName, permissionstatus, controller, permissiondescription",

0 commit comments

Comments
 (0)