cancel
Showing results for 
Search instead for 
Did you mean: 

How to get list of all logged in users?

shvalf
Champ in-the-making
Champ in-the-making
Hi,

I want to know how can i get list of all users who are logged into alfresco repo currently or at any time.

Which service/api/functionality should i refer to?
2 REPLIES 2

shvalf
Champ in-the-making
Champ in-the-making
Hi Again,

No idea..it does not really exist or no one really knows?

mrgrechkinn
Champ in-the-making
Champ in-the-making
Hi,

I have not found an easy way to do this. And I did like this:

Java class:

public class MyUtils extends BaseProcessorExtension {

    private TicketComponent ticketComponent;

    public void setNodeService(NodeService nodeService) {
        this.nodeService = nodeService;
    }

    public boolean isAuthenticated(String userName) {
        return ticketComponent.getUsersWithTickets(true).contains(userName);
    }

    public Set<String> getUsersWithTIckets() {
        return ticketComponent.getUsersWithTickets(true);
    }
}

Then register it in Spring context my-context.xml

….
<bean id="js.extension.myUtils" class="my.package.MyUtils" parent="baseJavaScriptExtension">
   <!– This bean declared in authentication-services-context.xml –>
   [b] <property name="ticketComponent" ref="ticketComponent"/>[/b]
    <property name="extensionName" value="myUtils"/>
</bean>
….

Then I create js webscript, where I can use myUtils. But getUsersWithTickets method return users for not expire tickets.
This configure in repository.properties, and if authentication.ticket.ticketsExpire equals false, this method will return users, until they are logged off.

So far I have not found alternatives.

Regards,
Eugene
Getting started

Tags


Find what you came for

We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.