mirror of
https://github.com/hansjone/oclaw.git
synced 2026-10-09 04:40:45 +08:00
Expose udsAuth.getRole for cron elevated-cwd checks.
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
parent
cc32a6c6ea
commit
1c461285fc
1 changed files with 5 additions and 0 deletions
|
|
@ -1057,6 +1057,11 @@ async function initServices(ctx, config) {
|
|||
canViewAllJobs(identity) {
|
||||
return !!identity?.permissions?.canViewAllSessions
|
||||
},
|
||||
getRole(empNo) {
|
||||
const id = String(empNo || '').trim()
|
||||
if (!id || id.startsWith('__')) return 'user'
|
||||
return _rolesStore?.getRole?.(id) || 'user'
|
||||
},
|
||||
/**
|
||||
* Resolve role + permissions for an empNo (cron tools / fire-time cwd).
|
||||
* Does not touch request cookies — pure lookup from roles store.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue