Need a macro to direct user to confluence login page when not logged in

Monica
Contributor
February 22, 2022

As the space admin, I need to learn how to setup the space so user will be redirected to our confluence instance login page when not logged in.

I am not confluence admin, but space admin. Can only control within the space.

Is there a macro that redirect user to our data center confluence instance login?

As email communications include pages to our space, users reported page error when the root cause is that they are not logged-in.

Thanks!

 

 

4 answers

1 accepted

Suggest an answer

Log in or Sign up to answer
0 votes
Answer accepted
Monica
Contributor
March 5, 2022

I troubleshoot with our Confluence admin Abebe and learn much about Confluence Space and page permission features. With that I realize that I was asking the wrong question for what I need/want.

To not waste the pain I went through and efforts of help from  @Patrick Heidel and @carlos_marin (Thank you!); here, I am reformulating what really happened to me and the best solution I've found so far.

Problem Statements 

  1. I have 2 confluence pages (p1 and p2) on space S1. 
  2. p1 contains ezBI macros requiring a login user to render. Users shall be redirected to login page when accessing p1 with its url prior to login. After login, p1 shall render without errors.
  3. p2 contains pages that shall allow view for anyone even without a confluence login. Users shall be able to view p2 using its url without any further action.

Solution

  1. Set space permission for space as shown belowScreenshot 2022-03-05 1.jpg
  2. Set p1 page restriction by clicking the "..." on the upper right corner of the page. On the pop out windows, set who can edit and who can view using your confluence users setting Screenshot 2022-03-05 2.jpgScreenshot 2022-03-05 3.jpg
0 votes
Monica
Contributor
February 23, 2022

@carlos_marin 

My whole purpose is to get the page as you described when I open the page without login.

The screenshot below shows what I get without login to confluence

confluenceNoErrorHint.jpg

I have another page created in a different space, that if I open it without login, I will get redirected to Confluence's login page. 

Don't know what created the difference and the behavior...

0 votes
Patrick Heidel
Contributor
February 23, 2022

Hi there, 

i dunno a macro to do this, but you could use miniOrange SSO Plugin to redirect and forward User to login pages just as you need it. 

https://marketplace.atlassian.com/vendors/1213308/miniorange


We are using this Plugin with our IDP and it works really fine. In addition they do have a really good support where you can place feature requests further on. 

If you do not have admin permissions then you should contact your admins i guess. For some Plugins it is a normal behaviour that user who are not logged in do not see the whole thing. 
For example if you are using a confluence Page whit anonymous access and are using a macro which need a logged in user as a validation. The Anonymous user wont see anything. This is discussed in many cases but works as expected. It could make sense to restrict the whole page to logged in users to avoid these behaviour.

Hope it helps.
Best regards

Patrick

Monica
Contributor
February 23, 2022

I'm not part of Confluence admin. 

Thanks for the reference. 

Patrick Heidel
Contributor
February 24, 2022

Then you should contact your admins i guess. For some Plugins it is a normal behaviour that user who are not logged in do not see the whole thing. 
For example if you are using a confluence Page whit anonymous access and are using a macro which need a logged in user as a validation. The Anonymous user wont see anything. This is discussed in many cases but works as expected. It could make sense to restrict the whole page to logged in users to avoid these behaviour.

Like Monica likes this
Monica
Contributor
February 24, 2022

I agree the logic you and what @carlos_marin describes.

I think I "jumped in" to the conclusion of forcing login using a macro that is still beyond my current skill. It would be easier had I have admin role in our confluence instance.

I realized that: in a space with a scroll viewport created, the default login behavior for restricted page is altered. What troubles me is that even I configured the viewport setting to be "restricted", it still renders the page without login detection. It may be a combinations of setting in both confluence space and scroll viewport as one space with scroll viewport has expected behavior and other doesn't. Kind of crazy...

I thank you ( @Patrick Heidel @carlos_marin ) both for responding my question! I get to reorganize and upgrade my understanding of Confluence.

Like carlos_marin likes this
0 votes
carlos_marin
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 22, 2022

Hi,

Could you put a screenshoot of the page error?

In that page should say something like you do no have access, but that page should say something to login with user account.

Best regards

Monica
Contributor
February 23, 2022

Sorry,

I replied using answer-to-my-own questions. New to community tools.☺

Please refer to that.

Monica

TAGS
AUG Leaders

Atlassian Community Events