-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add "MFA Verified" check to workflowengine #36045
Add "MFA Verified" check to workflowengine #36045
Conversation
16fc4bb
to
d6c2541
Compare
class: 'OCA\\WorkflowEngine\\Check\\MfaVerified', | ||
name: t('workflowengine', 'MFA Verified'), | ||
operators: [ | ||
{ operator: 'is', name: t('workflowengine', 'is verified?') }, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
and is not?
That would allow e.g. to use access control to block access to folders for people that did not 2fa
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, this is a default boolean dropdown (@mrvahedi68 will provide some screenshots of it later today); the operator
of the check is always "is" and the value
of the check can be "true" or "false".
So that way both "MFA verified is true" and "MFA verified is false" are available. Indeed, for blocking access to a folder you would create a rule to "block access" if "MFA verified is false"
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can see here to screenshots of it. We have a dropdown with only one field 'is verified?
and another textbox with a hint (true
) that user can input anything. So We have a check at this function to validate user input. (you can see a related screenshot below). Based on this rule admin can restrict access to files by MFA verified is false or true.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah okay. Because that is trouble some with translations and admins using different langauges, I would recomment to:
- Operation:
- is
- is not
- Value (hard coded to):
- verified
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When you use a dedicated component you can even remove the input field for the value.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I changed the source and use the new approach you described above.
Now we have only one drop-down with two values and no other inputs.
You can find screenshots at the flowing.
@nickvergessen
Not sure why |
Ah, need to run |
The failing test seems unrelated. @mrvahedi68 can you sign off your commits? |
Failing lint and node are related. Fixable with:
And then commit. If you fail to do that, that's no problem, we can easily take that over. |
6a54f50
to
0f34247
Compare
Author: MohammadReza Vahedi (@mrvahedi68) Signed-off-by: Michiel de Jong <michiel@unhosted.org>
Signed-off-by: Michiel de Jong <michiel@unhosted.org>
Signed-off-by: Michiel de Jong <michiel@unhosted.org>
Signed-off-by: Michiel de Jong <michiel@unhosted.org>
0f34247
to
6a98590
Compare
Signed-off-by: Michiel de Jong <michiel@unhosted.org>
ca9f8b1
to
cd13b39
Compare
This PR seems to be using the wrong branch, will recreate it. |
This PR goes together with:
It allows the creation of work flows that depend on whether the logged-in user has passed MFA Verification for the current session or not.