check confluence account status in ConfiForms

JC Zhu June 11, 2021

I am collecting inputs and assign them to users stored in another form. If a user in that form is no longer active, I'll prevent new entries being entered that'd be assigned to him/her.

On a confluence page you just type "@..." to see if anything comes up. Does anyone know if it's possible to check this in ConfiForms? 

1 answer

1 accepted

0 votes
Answer accepted
Alex Medved _ConfiForms_
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.
June 11, 2021

User (and multi-user) fields in ConfiForms use the same API as user mentions and provide the same result

Also it might be a good idea to check if the user (username value) is in security group - https://wiki.vertuna.com/display/CONFIFORMS/Virtual+functions 

  • userInSecurityGroup

  • securityGroupHas

This can be done by using the https://wiki.vertuna.com/display/CONFIFORMS/ConfiForms+Field+Definition+Rules#ConfiFormsFieldDefinitionRules-Validationrule 

Alex 

JC Zhu June 15, 2021

Hi Alex.

How does the first method work?

My working table has a smart classifier that reads a source table which contains a column of users. Once a selection is made, I copy the user in that column into a json and call the jira api. So if the user is invalid, jira fails.

I tried to copy the user from the source table into my current table using a field definition rule:

Assignee=[entry.MyClassifier.User]

I was hoping that this would be unsuccessful if user is not valid. But the field Assignee is blindly populated as the classifier is picked. I guess option 2 could have worked as a condition in the field definition rule but we don't use security groups.

Thanks,
JC

Alex Medved _ConfiForms_
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.
June 16, 2021

Add validation rule and condition that checks in the user you have registered in the table/form is still in the Confluence group (in the rule you define a "failing condition") Here, I am checking if the user is in confluence-users group (actually NOT in the group)

MyClassifier.User.userInSecurityGroup(confluence-users):false

Alex 

JC Zhu June 16, 2021

Hi Alex,

This wouldn't work since we do not have confluence security groups.

BTW, where can I read more about these security groups?

Thanks,
JC

Alex Medved _ConfiForms_
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.
June 17, 2021

Hard to believe... how do you manage permissions and restrictions if you are not using user security groups!?

https://confluence.atlassian.com/conf59/add-users-and-set-permissions-792498553.html 

Alex

JC Zhu June 17, 2021

Alex,

We do have user groups but I wasn't sure if it's the same as what you call user security group.

Anyway, your condition worked. I was using the following and it doesn't work:

[entry.MyClassifier.User].userInSecurityGroup(confluence-users):false

When is "[entry" needed?

Thanks,
JC

Alex Medved _ConfiForms_
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.
June 18, 2021

"[entry" is needed when you want to retrieve the value of a field or evaluate expression

somefield:[entry.anotherfield]

Makes sense as you check the field  somefield against the value in "anotherfield"

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events