Issue 52254: Folder admins cannot choose a template folder#6315
Conversation
| // add the container itself to the templateFolder object if it is not the root and the user has admin perm to it | ||
| // and if it is not a workbook or container tab folder | ||
| if (data.path !== "/" && LABKEY.Security.hasEffectivePermission(data.effectivePermissions, LABKEY.Security.effectivePermissions.admin) | ||
| if (data.path !== "/" && data.effectivePermissions && LABKEY.Security.hasEffectivePermission(data.effectivePermissions, LABKEY.Security.effectivePermissions.admin) |
There was a problem hiding this comment.
We could/should consider also making LABKEY.Security.hasEffectivePermission() defensive of falsey inputs.
There was a problem hiding this comment.
I briefly considered that and seems like it would be a fine approach too. Would that be here?
I'm confused about how the TS version is or isn't involved.
There was a problem hiding this comment.
I think its OK to not do this in 24.11 and just put the change in as you have it.
Additionally, I've tried to describe how the client API is served. Let me know if this is helpful.
There was a problem hiding this comment.
Additionally, I've tried to describe how the client API is served. Let me know if this is helpful.
Yes, definitely. I hope to be able to find it in the future.
Rationale
Folder admins don't have access to the root container, so
getContainerssends neither aneffectivePermissionsarray nor apath.The old behavior was to call
LABKEY.Security.hasPermission()which did a bitwise AND, so therefore tolerated an undefined value#5718
Changes