How to search for all not disabled users with a CMIS query

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

How to search for all not disabled users with a CMIS query

Jump to solution

Today I come again to ask for help.

I need to filter out all the disabled users. So far I got this CMIS query to get the ID from every  user:

"SELECT cmis:objectId FROM cm:person WHERE cm:homeFolderProvider = 'userHomesHomeFolderProvider' "

Then, I got this query to get the ID from every disabled  user:

"SELECT cmis:objectId FROM cm:personDisabled"

So, to filter out all the disabled users, I query:

"SELECT cmis:objectId FROM cm:person WHERE cmis:objectID NOT IN (SELECT cmis:objectId FROM cm:personDisabled)"

But the software runs into an error. I'm testing this with cmislib3 for python, the node browser inside alfresco and want to develop a javascript webscript to send mails to every active user.

I hope you can help me with this question.

Best regards,

Ignacio

 

 

1 Solution

Accepted Solutions
angelborroy
Alfresco Employee

Re: How to search for all not disabled users with a CMIS query

Jump to solution

I guess you need some code at this point, since the information can't be retrieved using a single SQL Query.

You need to perform 2 queries and filter out the disabled users.

Hyland Developer Evangelist

View solution in original post

2 Replies
angelborroy
Alfresco Employee

Re: How to search for all not disabled users with a CMIS query

Jump to solution

I guess you need some code at this point, since the information can't be retrieved using a single SQL Query.

You need to perform 2 queries and filter out the disabled users.

Hyland Developer Evangelist
idebonis
Active Member II

Re: How to search for all not disabled users with a CMIS query

Jump to solution

Thanks, I had already resigned myself to this solution. I guess it is out of the CMIS boundaries.