In my previous blog I have shared how to assign users into spaces. Now I have a request to unassign them from the spaces so that all the apps that they have created will be frozen, i.e., they will not be able to make further changes. This is good for hackathon where they can make use of the assigned space to build their submission and once the deadline for submission is over, they will not be able to make any more changes. With Qlik Application Automation, this process can be automated from by downgrading the user's role to read only.
First I will loop through all the spaces using the List Spaces block
I used the Condition block to check the name of the spaces if it fits a predefined pattern
In my scenario I have suffix all the spaces with DAT2022, so the condition will be if the first 7 characters contain 'DAT2022'
I will then list down all the members within the space using the List Members from Space block
Next I will update the roles of the user using the Update Roles of Member from Space
I will need to specify the space ID, User ID and the Roles. In this case I will set them as 'consumer' which has view only rights
The following is the entire flow of the Qlik Application Automation