Can I get the current "atl_token" ??
Confluence 4.0.
thnx
Hi Bryan,
Do you mean this - https://developer.atlassian.com/display/CONFDEV/Form+Token+Handling - ?
Andrew.
Don't know. What do you mean by atl_token?
Andrew:
#url_xsrfToken() works... thanks
For everyone stumbling over atl_token, which they need in order to send queries to built-in actions such as setcontentpermissions.action.
atl_token
setcontentpermissions.action
You can get it $('[name="atl_token"]').attr('value') on Confluence pages.
$('[name="atl_token"]').attr('value')
So from now on, this works:
$.get(`${location.origin}/pages/setcontentpermissions.action?viewPermissionsGroups=k15t-users&editPermissionsGroups=k15t-users&contentId=${AJS.Meta.get('draft-id')}&atl_token=${$('[name="atl_token"]').attr('value')}`)
Since AJS.safe.get() does not work, you can use the atl_token in your own requests with whatever XMLHTTPRequest fashion you want.
AJS.safe.get()
Hi Martin!
Do you have an idea how to add user restrictions instead of group-restriction with this method?
I found out that using ?viewPermissionsUsers=USER does not work. It only works with a long user key like this: viewPermissionsUsers=8a8a89a55365d4c6015365d5e9c913af
I can get the current user from a the meta-tag "ajs-remote-user-key", but I don´t know how to get this key for arbitrary users. Thanks
It looks like you're new here. Sign in or register to get started.