Write Access condition - keyword or SSJS equivalent?


(Douglas (@finnatic at @waikato)) #1

Can anyone point me at a keyword or SSJS equivalent of the Write Access condition ? There’s a conditional check but I’m trying to find a way to check the user access on the created page for a public form…


(Bart Banda) #2

I can’t think of an easy way to check, we are however adding new keywords into 5.4.3.0 to determine this https://squizmap.squiz.net/matrix/11176

What’s the use case?


(Douglas (@finnatic at @waikato)) #3

My use case is a form used by both public visitors and staff with access. I’d like to be able to check for write access on the created page and show links to further edit the created asset if the user is known and has write access.

The squizmap seems to be focussed on the current asset, and not necessarily a ‘user has access to the site where this asset lives?’


(Bart Banda) #4

You could maybe put those links in a content container that has different permissions?

Yes, you’d want to check on specific assets, not just the site asset, and you can’t check permissions on a whole site and all of it’s pages in one go, unless you do a check on the user group they belong to?

Actually, in saying that, you could also use the %globals_user_member_groups% to see if the user is a member of the user group that has write access to the site, and then conditionally print the links?