Customize login page of Share

cancel
Showing results for 
Search instead for 
Did you mean: 
Isha
Member II

Customize login page of Share

Hi,

I want to know whether the below scenario is possible for customizing the share login page:

I want to have site name dropdown when user hits login page. for e.g in current login page we have username and password and I want to have the assigned site name dropdown populated ones user enters username and password(before clicking on login button).

 

Thanks ,

Isha Shah

7 Replies
abhinavmishra14
Advanced

Re: Customize login page of Share

Can you explain a littile bit more about the use case ? What you want to achieve with this implementation ?

 

~Abhinav
(ACSCE, AWS SAA, Azure Admin)
Isha
Member II

Re: Customize login page of Share

Hi @abhinavmishra14 

My use case is as below :

1)Can i customize login page ...so that when user selects site name ..it directly redirects to the respective site dashboard and only that site cotent is available for him to view.

2) or else i want to add one custom page after login , which prompts user to select the available site for him and redirects it to particular site dashboard.

So basically my usecase need is i want to allow the user to access site specific data only.

Thank you!!

 

 

sanjaybandhniya
Intermediate

Re: Customize login page of Share

Hi,

In Alfresco user are able to view content of site which he/she has access.

Just create provate site and add users so only those users can access , no one can able to join that site.

Isha
Member II

Re: Customize login page of Share

Hi @sanjaybandhniya ,

Thanks.

But I want that after user login also.. he/she should be able to see the site content which has benn selected at the time of login.Kindly refer the above reply for my use case.

 

EddieMay
Alfresco Employee

Re: Customize login page of Share

Hi @Isha,

You can override the Share login page - see the documentation. As for adding the user's share sites,  you won't know which sites the user belongs to until after they have logged in. I suspect you will have to use the API to log the user in & then get a list back of the user's sites, & then populate a dropdown of available sites. Not a trivial task.

HTH,

Digital Community Manager, Alfresco Software.
Problem solved? Click Accept as Solution!
abhinavmishra14
Advanced

Re: Customize login page of Share

"1) Can i customize login page ...so that when user selects site name ..it directly redirects to the respective site dashboard and only that site cotent is available for him to view.

2) or else i want to add one custom page after login , which prompts user to select the available site for him and redirects it to particular site dashboard."

--------------------

Based on above statements- what i understood is that, you want user to login by selecting a site and when they are logged in they go to the selected site directly. If this understanding is correct, i could think of these approaches:

Approach 1:

- Create a custom webscript/restapi which returns (as guest user) the list of all available sites (remember, you cannot determine only available sites to a particular user unless you know who is the target user)
Note that, if you are concerned about showing the site details to users without knowing who they are, you should consider going with different approach or approach 2.
You need to create this custom webscript/restapi, because any OOTB rest apis wouldn't return unless you provide credentials/token. That's why you need a webscript/restapi which returns as guest user.

For your refrence these are ootb rest apis:
https://docs.alfresco.com/5.0/pra/1/concepts/pra-sites-get-sites.html
https://docs.alfresco.com/5.0/references/RESTful-SiteSitesGet.html


- Extend the login page and display a dropdown for user to select the site.
Refer to the following project which has an example of extending share login page:
https://github.com/jpotts/share-announcements

- Implement a filter that redirect user to the selected site.
Refer to this project which has an example of filter implementation: https://github.com/keensoft/alfresco-site-home-page


Approach 2 (like your 2nd use case):

- Implement a filter that redirect user to select sites page after login.
Refer to this project which has an example of filter implementation: https://github.com/keensoft/alfresco-site-home-page

- Implement a custom page which will be displayed before going to site dashboard for selecting site based on authenticated user.
Refer this project which shows an example of a consent page: https://github.com/keensoft/alfresco-agreement-filter

- Create a custom webscript/restapi which returns the list of all available sites where the authenticated user is a member of those sites.

- Implement a filter that redirect user to site dashboard after site selection.
Refer to this project which has an example of filter implementation: https://github.com/keensoft/alfresco-site-home-page


Finally:

- Disable all links so user can not find other sites like you mentioned in your use case. Controlling the site search will be tricky though. I would suggest not to disable link to find sites, which allows the user to go to a different site without logging out. You can, however update the site search to return only sites available to the logged in user where user is a member of those sites.

From 5.1x version onwards user can set their default site dashboard as well. Refer this doc if you want to utilize this option without doing a lot of customizations:

https://docs.alfresco.com/5.1/tasks/set-homepage.html

~Abhinav
(ACSCE, AWS SAA, Azure Admin)
Isha
Member II

Re: Customize login page of Share

Thanks @abhinavmishra14 .

Surely this detailed approach will work for me .