Java Script and View Restriction in Confluence

Hello All,

I have 2 questions.

1) After i add Javascript code, it never excutes and also it disappears once i reopen source code page.

2) when i add users to "view restirction" i am finding my name in the list. how should i avoid my name in the list.

Advance Thanks for your help.

2 answers

You can execute some javascript inside Confluence page through html macro. However if you have security concern we would recommend you not to enable html macro on the first place.

As for the restriction, it would not make sense if you remove yourself from the restriction, as you would nto be able to see the page anymore. Moreover if you are the page owner of space admin.

1) After i add Javascript code, it never excutes and also it disappears once i reopen source code page.

Confluence prevents the execution of Javascript in page content, which would be a huge security risk. YOu should write a user-macro instead.

https://confluence.atlassian.com/display/DOC/Writing+User+Macros

2) when i add users to "view restirction" i am finding my name in the list. how should i avoid my name in the list.

Removing your name from the list would prevent you from seeing it. Restrictions to view lists those who CAN see it. It is not listing those who CAN NOT see it. Adding only your name means you are the only one to see it.

https://confluence.atlassian.com/display/DOC/Page+Restrictions

Suggest an answer

Log in or Sign up to answer
Atlassian Community Anniversary

Happy Anniversary, Atlassian Community!

This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.

Read more
Community showcase
Kesha Thillainayagam
Posted Apr 13, 2018 in Confluence

We want to hear how your non-technical teams are using Confluence!

Hi Community! Kesha (kay-sha) from the Confluence marketing team here! Can you share stories with us on how your non-technical (think Marketing, Sales, HR, legal, etc.) teams are using Confluen...

2,090 views 25 10
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you