web/admin: only allow policies to be bound to sources as users/groups cannot be checked

Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
Jens Langhammer 2021-04-20 23:30:37 +02:00
parent 73950b72e5
commit fec098a823
6 changed files with 162 additions and 135 deletions

View File

@ -13,7 +13,7 @@ msgstr ""
"Language-Team: \n"
"Plural-Forms: \n"
#: src/pages/policies/BoundPoliciesList.ts:55
#: src/pages/policies/BoundPoliciesList.ts:59
msgid "-"
msgstr "-"
@ -714,9 +714,9 @@ msgstr "Copy Key"
#: src/pages/outposts/OutpostListPage.ts:109
#: src/pages/outposts/ServiceConnectionListPage.ts:110
#: src/pages/outposts/ServiceConnectionListPage.ts:119
#: src/pages/policies/BoundPoliciesList.ts:158
#: src/pages/policies/BoundPoliciesList.ts:185
#: src/pages/policies/BoundPoliciesList.ts:206
#: src/pages/policies/BoundPoliciesList.ts:162
#: src/pages/policies/BoundPoliciesList.ts:189
#: src/pages/policies/BoundPoliciesList.ts:210
#: src/pages/policies/PolicyListPage.ts:124
#: src/pages/policies/PolicyListPage.ts:133
#: src/pages/property-mappings/PropertyMappingListPage.ts:113
@ -747,10 +747,10 @@ msgstr "Create"
msgid "Create Application"
msgstr "Create Application"
#: src/pages/policies/BoundPoliciesList.ts:161
#: src/pages/policies/BoundPoliciesList.ts:166
#: src/pages/policies/BoundPoliciesList.ts:209
#: src/pages/policies/BoundPoliciesList.ts:214
#: src/pages/policies/BoundPoliciesList.ts:165
#: src/pages/policies/BoundPoliciesList.ts:170
#: src/pages/policies/BoundPoliciesList.ts:213
#: src/pages/policies/BoundPoliciesList.ts:218
msgid "Create Binding"
msgstr "Create Binding"
@ -786,7 +786,7 @@ msgstr "Create Notification Transport"
msgid "Create Outpost"
msgstr "Create Outpost"
#: src/pages/policies/BoundPoliciesList.ts:176
#: src/pages/policies/BoundPoliciesList.ts:180
msgid "Create Policy"
msgstr "Create Policy"
@ -819,7 +819,7 @@ msgstr "Create provider"
#: src/pages/applications/ApplicationForm.ts:123
#: src/pages/flows/BoundStagesList.ts:149
#: src/pages/outposts/ServiceConnectionListPage.ts:122
#: src/pages/policies/BoundPoliciesList.ts:188
#: src/pages/policies/BoundPoliciesList.ts:192
#: src/pages/policies/PolicyListPage.ts:136
#: src/pages/property-mappings/PropertyMappingListPage.ts:125
#: src/pages/providers/ProviderListPage.ts:119
@ -895,7 +895,7 @@ msgid "Delete Authorization Code"
msgstr "Delete Authorization Code"
#: src/pages/flows/BoundStagesList.ts:91
#: src/pages/policies/BoundPoliciesList.ts:145
#: src/pages/policies/BoundPoliciesList.ts:149
msgid "Delete Binding"
msgstr "Delete Binding"
@ -1043,15 +1043,15 @@ msgid "Edit"
msgstr "Edit"
#: src/pages/flows/BoundStagesList.ts:79
#: src/pages/policies/BoundPoliciesList.ts:133
#: src/pages/policies/BoundPoliciesList.ts:137
msgid "Edit Binding"
msgstr "Edit Binding"
#: src/pages/policies/BoundPoliciesList.ts:92
#: src/pages/policies/BoundPoliciesList.ts:96
msgid "Edit Group"
msgstr "Edit Group"
#: src/pages/policies/BoundPoliciesList.ts:77
#: src/pages/policies/BoundPoliciesList.ts:81
msgid "Edit Policy"
msgstr "Edit Policy"
@ -1059,7 +1059,7 @@ msgstr "Edit Policy"
msgid "Edit Stage"
msgstr "Edit Stage"
#: src/pages/policies/BoundPoliciesList.ts:107
#: src/pages/policies/BoundPoliciesList.ts:111
msgid "Edit User"
msgstr "Edit User"
@ -1104,8 +1104,8 @@ msgstr "Enable Static Tokens"
msgid "Enable TOTP"
msgstr "Enable TOTP"
#: src/pages/policies/BoundPoliciesList.ts:37
#: src/pages/policies/PolicyBindingForm.ts:198
#: src/pages/policies/BoundPoliciesList.ts:41
#: src/pages/policies/PolicyBindingForm.ts:199
#: src/pages/sources/ldap/LDAPSourceForm.ts:69
#: src/pages/sources/oauth/OAuthSourceForm.ts:115
#: src/pages/sources/saml/SAMLSourceForm.ts:69
@ -1421,8 +1421,8 @@ msgstr "Go to previous page"
#: src/pages/events/RuleForm.ts:65
#: src/pages/groups/GroupListPage.ts:75
#: src/pages/policies/PolicyBindingForm.ts:132
#: src/pages/policies/PolicyBindingForm.ts:160
#: src/pages/policies/PolicyBindingForm.ts:125
#: src/pages/policies/PolicyBindingForm.ts:161
msgid "Group"
msgstr "Group"
@ -1442,7 +1442,7 @@ msgstr "Group object filter"
msgid "Group users together and give them permissions based on the membership."
msgstr "Group users together and give them permissions based on the membership."
#: src/pages/policies/BoundPoliciesList.ts:49
#: src/pages/policies/BoundPoliciesList.ts:53
msgid "Group {0}"
msgstr "Group {0}"
@ -1699,9 +1699,9 @@ msgstr "Loading"
#: src/pages/outposts/OutpostForm.ts:96
#: src/pages/outposts/ServiceConnectionDockerForm.ts:87
#: src/pages/outposts/ServiceConnectionDockerForm.ts:104
#: src/pages/policies/PolicyBindingForm.ts:156
#: src/pages/policies/PolicyBindingForm.ts:172
#: src/pages/policies/PolicyBindingForm.ts:188
#: src/pages/policies/PolicyBindingForm.ts:157
#: src/pages/policies/PolicyBindingForm.ts:173
#: src/pages/policies/PolicyBindingForm.ts:189
#: src/pages/policies/PolicyTestForm.ts:71
#: src/pages/policies/event_matcher/EventMatcherPolicyForm.ts:88
#: src/pages/policies/event_matcher/EventMatcherPolicyForm.ts:108
@ -1942,7 +1942,7 @@ msgstr "New version available!"
#: src/pages/groups/GroupListPage.ts:58
#: src/pages/groups/MemberSelectModal.ts:57
#: src/pages/outposts/ServiceConnectionListPage.ts:64
#: src/pages/policies/BoundPoliciesList.ts:118
#: src/pages/policies/BoundPoliciesList.ts:122
#: src/pages/policies/PolicyTestForm.ts:39
#: src/pages/providers/proxy/ProxyProviderViewPage.ts:108
#: src/pages/tokens/TokenListPage.ts:56
@ -1960,7 +1960,7 @@ msgstr "No Applications available."
msgid "No Events found."
msgstr "No Events found."
#: src/pages/policies/BoundPoliciesList.ts:151
#: src/pages/policies/BoundPoliciesList.ts:155
msgid "No Policies bound."
msgstr "No Policies bound."
@ -1989,7 +1989,7 @@ msgstr "No form found"
msgid "No matching events could be found."
msgstr "No matching events could be found."
#: src/pages/policies/BoundPoliciesList.ts:153
#: src/pages/policies/BoundPoliciesList.ts:157
msgid "No policies are currently bound to this object."
msgstr "No policies are currently bound to this object."
@ -2161,8 +2161,8 @@ msgstr "Optionally set the 'FriendlyName' value of the Assertion attribute."
#: src/pages/flows/BoundStagesList.ts:38
#: src/pages/flows/StageBindingForm.ts:110
#: src/pages/policies/BoundPoliciesList.ts:38
#: src/pages/policies/PolicyBindingForm.ts:203
#: src/pages/policies/BoundPoliciesList.ts:42
#: src/pages/policies/PolicyBindingForm.ts:204
#: src/pages/stages/prompt/PromptForm.ts:119
#: src/pages/stages/prompt/PromptListPage.ts:49
msgid "Order"
@ -2264,8 +2264,9 @@ msgstr "Policies"
msgid "Policies without binding exist."
msgstr "Policies without binding exist."
#: src/pages/policies/PolicyBindingForm.ts:124
#: src/pages/policies/PolicyBindingForm.ts:147
#: src/pages/policies/PolicyBindingForm.ts:108
#: src/pages/policies/PolicyBindingForm.ts:117
#: src/pages/policies/PolicyBindingForm.ts:148
#: src/pages/policies/PolicyListPage.ts:108
msgid "Policy"
msgstr "Policy"
@ -2275,7 +2276,7 @@ msgstr "Policy"
msgid "Policy / Group / User Bindings"
msgstr "Policy / Group / User Bindings"
#: src/pages/policies/BoundPoliciesList.ts:36
#: src/pages/policies/BoundPoliciesList.ts:40
msgid "Policy / User / Group"
msgstr "Policy / User / Group"
@ -2284,7 +2285,7 @@ msgstr "Policy / User / Group"
msgid "Policy Bindings"
msgstr "Policy Bindings"
#: src/pages/policies/BoundPoliciesList.ts:138
#: src/pages/policies/BoundPoliciesList.ts:142
msgid "Policy binding"
msgstr "Policy binding"
@ -2295,7 +2296,7 @@ msgstr "Policy binding"
msgid "Policy engine mode"
msgstr "Policy engine mode"
#: src/pages/policies/BoundPoliciesList.ts:46
#: src/pages/policies/BoundPoliciesList.ts:50
msgid "Policy {0}"
msgstr "Policy {0}"
@ -2974,7 +2975,7 @@ msgid "Successfully created application."
msgstr "Successfully created application."
#: src/pages/flows/StageBindingForm.ts:39
#: src/pages/policies/PolicyBindingForm.ts:72
#: src/pages/policies/PolicyBindingForm.ts:64
msgid "Successfully created binding."
msgstr "Successfully created binding."
@ -3102,7 +3103,7 @@ msgid "Successfully updated application."
msgstr "Successfully updated application."
#: src/pages/flows/StageBindingForm.ts:36
#: src/pages/policies/PolicyBindingForm.ts:69
#: src/pages/policies/PolicyBindingForm.ts:61
msgid "Successfully updated binding."
msgstr "Successfully updated binding."
@ -3326,8 +3327,12 @@ msgstr "These bindings control which users can access this flow."
#: src/pages/sources/oauth/OAuthSourceViewPage.ts:146
#: src/pages/sources/saml/SAMLSourceViewPage.ts:152
msgid "These bindings control which users can access this source."
msgstr "These bindings control which users can access this source."
msgid ""
"These bindings control which users can access this source.\n"
"You can only use policies here as access is checked before the user is authenticated."
msgstr ""
"These bindings control which users can access this source.\n"
"You can only use policies here as access is checked before the user is authenticated."
#: src/pages/applications/ApplicationViewPage.ts:136
msgid "These policies control which users can access this application."
@ -3357,8 +3362,8 @@ msgstr "Time offset when temporary users should be deleted. This only applies if
msgid "Time-based One-Time Passwords"
msgstr "Time-based One-Time Passwords"
#: src/pages/policies/BoundPoliciesList.ts:39
#: src/pages/policies/PolicyBindingForm.ts:209
#: src/pages/policies/BoundPoliciesList.ts:43
#: src/pages/policies/PolicyBindingForm.ts:210
#: src/pages/stages/email/EmailStageForm.ts:101
msgid "Timeout"
msgstr "Timeout"
@ -3483,10 +3488,10 @@ msgstr "Up-to-date!"
#: src/pages/groups/GroupListPage.ts:62
#: src/pages/outposts/OutpostListPage.ts:67
#: src/pages/outposts/ServiceConnectionListPage.ts:76
#: src/pages/policies/BoundPoliciesList.ts:64
#: src/pages/policies/BoundPoliciesList.ts:84
#: src/pages/policies/BoundPoliciesList.ts:99
#: src/pages/policies/BoundPoliciesList.ts:125
#: src/pages/policies/BoundPoliciesList.ts:68
#: src/pages/policies/BoundPoliciesList.ts:88
#: src/pages/policies/BoundPoliciesList.ts:103
#: src/pages/policies/BoundPoliciesList.ts:129
#: src/pages/policies/PolicyListPage.ts:77
#: src/pages/property-mappings/PropertyMappingListPage.ts:66
#: src/pages/providers/ProviderListPage.ts:73
@ -3515,7 +3520,7 @@ msgstr "Update"
msgid "Update Application"
msgstr "Update Application"
#: src/pages/policies/BoundPoliciesList.ts:128
#: src/pages/policies/BoundPoliciesList.ts:132
msgid "Update Binding"
msgstr "Update Binding"
@ -3528,7 +3533,7 @@ msgid "Update Flow"
msgstr "Update Flow"
#: src/pages/groups/GroupListPage.ts:65
#: src/pages/policies/BoundPoliciesList.ts:87
#: src/pages/policies/BoundPoliciesList.ts:91
msgid "Update Group"
msgstr "Update Group"
@ -3580,7 +3585,7 @@ msgstr "Update Stage binding"
msgid "Update Token"
msgstr "Update Token"
#: src/pages/policies/BoundPoliciesList.ts:102
#: src/pages/policies/BoundPoliciesList.ts:106
#: src/pages/users/UserListPage.ts:71
#: src/pages/users/UserViewPage.ts:142
msgid "Update User"
@ -3592,7 +3597,7 @@ msgstr "Update details"
#: src/pages/flows/BoundStagesList.ts:56
#: src/pages/outposts/ServiceConnectionListPage.ts:79
#: src/pages/policies/BoundPoliciesList.ts:67
#: src/pages/policies/BoundPoliciesList.ts:71
#: src/pages/policies/PolicyListPage.ts:80
#: src/pages/property-mappings/PropertyMappingListPage.ts:69
#: src/pages/providers/ProviderListPage.ts:76
@ -3626,8 +3631,8 @@ msgstr "Use global settings"
#: src/elements/events/UserEvents.ts:36
#: src/pages/events/EventInfo.ts:83
#: src/pages/events/EventListPage.ts:44
#: src/pages/policies/PolicyBindingForm.ts:140
#: src/pages/policies/PolicyBindingForm.ts:176
#: src/pages/policies/PolicyBindingForm.ts:133
#: src/pages/policies/PolicyBindingForm.ts:177
#: src/pages/policies/PolicyTestForm.ts:61
#: src/pages/property-mappings/PropertyMappingTestForm.ts:51
#: src/pages/tokens/TokenListPage.ts:45
@ -3670,7 +3675,7 @@ msgstr "User object filter"
msgid "User password writeback"
msgstr "User password writeback"
#: src/pages/policies/BoundPoliciesList.ts:52
#: src/pages/policies/BoundPoliciesList.ts:56
#: src/pages/users/UserViewPage.ts:63
msgid "User {0}"
msgstr "User {0}"
@ -3872,7 +3877,7 @@ msgstr "X509 Subject"
#: src/pages/groups/GroupListPage.ts:58
#: src/pages/groups/MemberSelectModal.ts:57
#: src/pages/outposts/ServiceConnectionListPage.ts:64
#: src/pages/policies/BoundPoliciesList.ts:118
#: src/pages/policies/BoundPoliciesList.ts:122
#: src/pages/policies/PolicyTestForm.ts:39
#: src/pages/providers/proxy/ProxyProviderViewPage.ts:105
#: src/pages/tokens/TokenListPage.ts:56

View File

@ -13,7 +13,7 @@ msgstr ""
"Language-Team: \n"
"Plural-Forms: \n"
#: src/pages/policies/BoundPoliciesList.ts:55
#: src/pages/policies/BoundPoliciesList.ts:59
msgid "-"
msgstr ""
@ -708,9 +708,9 @@ msgstr ""
#: src/pages/outposts/OutpostListPage.ts:109
#: src/pages/outposts/ServiceConnectionListPage.ts:110
#: src/pages/outposts/ServiceConnectionListPage.ts:119
#: src/pages/policies/BoundPoliciesList.ts:158
#: src/pages/policies/BoundPoliciesList.ts:185
#: src/pages/policies/BoundPoliciesList.ts:206
#: src/pages/policies/BoundPoliciesList.ts:162
#: src/pages/policies/BoundPoliciesList.ts:189
#: src/pages/policies/BoundPoliciesList.ts:210
#: src/pages/policies/PolicyListPage.ts:124
#: src/pages/policies/PolicyListPage.ts:133
#: src/pages/property-mappings/PropertyMappingListPage.ts:113
@ -741,10 +741,10 @@ msgstr ""
msgid "Create Application"
msgstr ""
#: src/pages/policies/BoundPoliciesList.ts:161
#: src/pages/policies/BoundPoliciesList.ts:166
#: src/pages/policies/BoundPoliciesList.ts:209
#: src/pages/policies/BoundPoliciesList.ts:214
#: src/pages/policies/BoundPoliciesList.ts:165
#: src/pages/policies/BoundPoliciesList.ts:170
#: src/pages/policies/BoundPoliciesList.ts:213
#: src/pages/policies/BoundPoliciesList.ts:218
msgid "Create Binding"
msgstr ""
@ -780,7 +780,7 @@ msgstr ""
msgid "Create Outpost"
msgstr ""
#: src/pages/policies/BoundPoliciesList.ts:176
#: src/pages/policies/BoundPoliciesList.ts:180
msgid "Create Policy"
msgstr ""
@ -813,7 +813,7 @@ msgstr ""
#: src/pages/applications/ApplicationForm.ts:123
#: src/pages/flows/BoundStagesList.ts:149
#: src/pages/outposts/ServiceConnectionListPage.ts:122
#: src/pages/policies/BoundPoliciesList.ts:188
#: src/pages/policies/BoundPoliciesList.ts:192
#: src/pages/policies/PolicyListPage.ts:136
#: src/pages/property-mappings/PropertyMappingListPage.ts:125
#: src/pages/providers/ProviderListPage.ts:119
@ -889,7 +889,7 @@ msgid "Delete Authorization Code"
msgstr ""
#: src/pages/flows/BoundStagesList.ts:91
#: src/pages/policies/BoundPoliciesList.ts:145
#: src/pages/policies/BoundPoliciesList.ts:149
msgid "Delete Binding"
msgstr ""
@ -1035,15 +1035,15 @@ msgid "Edit"
msgstr ""
#: src/pages/flows/BoundStagesList.ts:79
#: src/pages/policies/BoundPoliciesList.ts:133
#: src/pages/policies/BoundPoliciesList.ts:137
msgid "Edit Binding"
msgstr ""
#: src/pages/policies/BoundPoliciesList.ts:92
#: src/pages/policies/BoundPoliciesList.ts:96
msgid "Edit Group"
msgstr ""
#: src/pages/policies/BoundPoliciesList.ts:77
#: src/pages/policies/BoundPoliciesList.ts:81
msgid "Edit Policy"
msgstr ""
@ -1051,7 +1051,7 @@ msgstr ""
msgid "Edit Stage"
msgstr ""
#: src/pages/policies/BoundPoliciesList.ts:107
#: src/pages/policies/BoundPoliciesList.ts:111
msgid "Edit User"
msgstr ""
@ -1096,8 +1096,8 @@ msgstr ""
msgid "Enable TOTP"
msgstr ""
#: src/pages/policies/BoundPoliciesList.ts:37
#: src/pages/policies/PolicyBindingForm.ts:198
#: src/pages/policies/BoundPoliciesList.ts:41
#: src/pages/policies/PolicyBindingForm.ts:199
#: src/pages/sources/ldap/LDAPSourceForm.ts:69
#: src/pages/sources/oauth/OAuthSourceForm.ts:115
#: src/pages/sources/saml/SAMLSourceForm.ts:69
@ -1413,8 +1413,8 @@ msgstr ""
#: src/pages/events/RuleForm.ts:65
#: src/pages/groups/GroupListPage.ts:75
#: src/pages/policies/PolicyBindingForm.ts:132
#: src/pages/policies/PolicyBindingForm.ts:160
#: src/pages/policies/PolicyBindingForm.ts:125
#: src/pages/policies/PolicyBindingForm.ts:161
msgid "Group"
msgstr ""
@ -1434,7 +1434,7 @@ msgstr ""
msgid "Group users together and give them permissions based on the membership."
msgstr ""
#: src/pages/policies/BoundPoliciesList.ts:49
#: src/pages/policies/BoundPoliciesList.ts:53
msgid "Group {0}"
msgstr ""
@ -1691,9 +1691,9 @@ msgstr ""
#: src/pages/outposts/OutpostForm.ts:96
#: src/pages/outposts/ServiceConnectionDockerForm.ts:87
#: src/pages/outposts/ServiceConnectionDockerForm.ts:104
#: src/pages/policies/PolicyBindingForm.ts:156
#: src/pages/policies/PolicyBindingForm.ts:172
#: src/pages/policies/PolicyBindingForm.ts:188
#: src/pages/policies/PolicyBindingForm.ts:157
#: src/pages/policies/PolicyBindingForm.ts:173
#: src/pages/policies/PolicyBindingForm.ts:189
#: src/pages/policies/PolicyTestForm.ts:71
#: src/pages/policies/event_matcher/EventMatcherPolicyForm.ts:88
#: src/pages/policies/event_matcher/EventMatcherPolicyForm.ts:108
@ -1934,7 +1934,7 @@ msgstr ""
#: src/pages/groups/GroupListPage.ts:58
#: src/pages/groups/MemberSelectModal.ts:57
#: src/pages/outposts/ServiceConnectionListPage.ts:64
#: src/pages/policies/BoundPoliciesList.ts:118
#: src/pages/policies/BoundPoliciesList.ts:122
#: src/pages/policies/PolicyTestForm.ts:39
#: src/pages/providers/proxy/ProxyProviderViewPage.ts:108
#: src/pages/tokens/TokenListPage.ts:56
@ -1952,7 +1952,7 @@ msgstr ""
msgid "No Events found."
msgstr ""
#: src/pages/policies/BoundPoliciesList.ts:151
#: src/pages/policies/BoundPoliciesList.ts:155
msgid "No Policies bound."
msgstr ""
@ -1981,7 +1981,7 @@ msgstr ""
msgid "No matching events could be found."
msgstr ""
#: src/pages/policies/BoundPoliciesList.ts:153
#: src/pages/policies/BoundPoliciesList.ts:157
msgid "No policies are currently bound to this object."
msgstr ""
@ -2153,8 +2153,8 @@ msgstr ""
#: src/pages/flows/BoundStagesList.ts:38
#: src/pages/flows/StageBindingForm.ts:110
#: src/pages/policies/BoundPoliciesList.ts:38
#: src/pages/policies/PolicyBindingForm.ts:203
#: src/pages/policies/BoundPoliciesList.ts:42
#: src/pages/policies/PolicyBindingForm.ts:204
#: src/pages/stages/prompt/PromptForm.ts:119
#: src/pages/stages/prompt/PromptListPage.ts:49
msgid "Order"
@ -2256,8 +2256,9 @@ msgstr ""
msgid "Policies without binding exist."
msgstr ""
#: src/pages/policies/PolicyBindingForm.ts:124
#: src/pages/policies/PolicyBindingForm.ts:147
#: src/pages/policies/PolicyBindingForm.ts:108
#: src/pages/policies/PolicyBindingForm.ts:117
#: src/pages/policies/PolicyBindingForm.ts:148
#: src/pages/policies/PolicyListPage.ts:108
msgid "Policy"
msgstr ""
@ -2267,7 +2268,7 @@ msgstr ""
msgid "Policy / Group / User Bindings"
msgstr ""
#: src/pages/policies/BoundPoliciesList.ts:36
#: src/pages/policies/BoundPoliciesList.ts:40
msgid "Policy / User / Group"
msgstr ""
@ -2276,7 +2277,7 @@ msgstr ""
msgid "Policy Bindings"
msgstr ""
#: src/pages/policies/BoundPoliciesList.ts:138
#: src/pages/policies/BoundPoliciesList.ts:142
msgid "Policy binding"
msgstr ""
@ -2287,7 +2288,7 @@ msgstr ""
msgid "Policy engine mode"
msgstr ""
#: src/pages/policies/BoundPoliciesList.ts:46
#: src/pages/policies/BoundPoliciesList.ts:50
msgid "Policy {0}"
msgstr ""
@ -2966,7 +2967,7 @@ msgid "Successfully created application."
msgstr ""
#: src/pages/flows/StageBindingForm.ts:39
#: src/pages/policies/PolicyBindingForm.ts:72
#: src/pages/policies/PolicyBindingForm.ts:64
msgid "Successfully created binding."
msgstr ""
@ -3094,7 +3095,7 @@ msgid "Successfully updated application."
msgstr ""
#: src/pages/flows/StageBindingForm.ts:36
#: src/pages/policies/PolicyBindingForm.ts:69
#: src/pages/policies/PolicyBindingForm.ts:61
msgid "Successfully updated binding."
msgstr ""
@ -3316,7 +3317,9 @@ msgstr ""
#: src/pages/sources/oauth/OAuthSourceViewPage.ts:146
#: src/pages/sources/saml/SAMLSourceViewPage.ts:152
msgid "These bindings control which users can access this source."
msgid ""
"These bindings control which users can access this source.\n"
"You can only use policies here as access is checked before the user is authenticated."
msgstr ""
#: src/pages/applications/ApplicationViewPage.ts:136
@ -3347,8 +3350,8 @@ msgstr ""
msgid "Time-based One-Time Passwords"
msgstr ""
#: src/pages/policies/BoundPoliciesList.ts:39
#: src/pages/policies/PolicyBindingForm.ts:209
#: src/pages/policies/BoundPoliciesList.ts:43
#: src/pages/policies/PolicyBindingForm.ts:210
#: src/pages/stages/email/EmailStageForm.ts:101
msgid "Timeout"
msgstr ""
@ -3473,10 +3476,10 @@ msgstr ""
#: src/pages/groups/GroupListPage.ts:62
#: src/pages/outposts/OutpostListPage.ts:67
#: src/pages/outposts/ServiceConnectionListPage.ts:76
#: src/pages/policies/BoundPoliciesList.ts:64
#: src/pages/policies/BoundPoliciesList.ts:84
#: src/pages/policies/BoundPoliciesList.ts:99
#: src/pages/policies/BoundPoliciesList.ts:125
#: src/pages/policies/BoundPoliciesList.ts:68
#: src/pages/policies/BoundPoliciesList.ts:88
#: src/pages/policies/BoundPoliciesList.ts:103
#: src/pages/policies/BoundPoliciesList.ts:129
#: src/pages/policies/PolicyListPage.ts:77
#: src/pages/property-mappings/PropertyMappingListPage.ts:66
#: src/pages/providers/ProviderListPage.ts:73
@ -3505,7 +3508,7 @@ msgstr ""
msgid "Update Application"
msgstr ""
#: src/pages/policies/BoundPoliciesList.ts:128
#: src/pages/policies/BoundPoliciesList.ts:132
msgid "Update Binding"
msgstr ""
@ -3518,7 +3521,7 @@ msgid "Update Flow"
msgstr ""
#: src/pages/groups/GroupListPage.ts:65
#: src/pages/policies/BoundPoliciesList.ts:87
#: src/pages/policies/BoundPoliciesList.ts:91
msgid "Update Group"
msgstr ""
@ -3570,7 +3573,7 @@ msgstr ""
msgid "Update Token"
msgstr ""
#: src/pages/policies/BoundPoliciesList.ts:102
#: src/pages/policies/BoundPoliciesList.ts:106
#: src/pages/users/UserListPage.ts:71
#: src/pages/users/UserViewPage.ts:142
msgid "Update User"
@ -3582,7 +3585,7 @@ msgstr ""
#: src/pages/flows/BoundStagesList.ts:56
#: src/pages/outposts/ServiceConnectionListPage.ts:79
#: src/pages/policies/BoundPoliciesList.ts:67
#: src/pages/policies/BoundPoliciesList.ts:71
#: src/pages/policies/PolicyListPage.ts:80
#: src/pages/property-mappings/PropertyMappingListPage.ts:69
#: src/pages/providers/ProviderListPage.ts:76
@ -3616,8 +3619,8 @@ msgstr ""
#: src/elements/events/UserEvents.ts:36
#: src/pages/events/EventInfo.ts:83
#: src/pages/events/EventListPage.ts:44
#: src/pages/policies/PolicyBindingForm.ts:140
#: src/pages/policies/PolicyBindingForm.ts:176
#: src/pages/policies/PolicyBindingForm.ts:133
#: src/pages/policies/PolicyBindingForm.ts:177
#: src/pages/policies/PolicyTestForm.ts:61
#: src/pages/property-mappings/PropertyMappingTestForm.ts:51
#: src/pages/tokens/TokenListPage.ts:45
@ -3660,7 +3663,7 @@ msgstr ""
msgid "User password writeback"
msgstr ""
#: src/pages/policies/BoundPoliciesList.ts:52
#: src/pages/policies/BoundPoliciesList.ts:56
#: src/pages/users/UserViewPage.ts:63
msgid "User {0}"
msgstr ""
@ -3860,7 +3863,7 @@ msgstr ""
#: src/pages/groups/GroupListPage.ts:58
#: src/pages/groups/MemberSelectModal.ts:57
#: src/pages/outposts/ServiceConnectionListPage.ts:64
#: src/pages/policies/BoundPoliciesList.ts:118
#: src/pages/policies/BoundPoliciesList.ts:122
#: src/pages/policies/PolicyTestForm.ts:39
#: src/pages/providers/proxy/ProxyProviderViewPage.ts:105
#: src/pages/tokens/TokenListPage.ts:56

View File

@ -25,6 +25,9 @@ export class BoundPoliciesList extends Table<PolicyBinding> {
@property()
target?: string;
@property({type: Boolean})
policyOnly = false;
apiEndpoint(page: number): Promise<AKResponse<PolicyBinding>> {
return new PoliciesApi(DEFAULT_CONFIG).policiesBindingsList({
target: this.target || "",
@ -125,7 +128,7 @@ export class BoundPoliciesList extends Table<PolicyBinding> {
<span slot="header">
${t`Update Binding`}
</span>
<ak-policy-binding-form slot="form" .binding=${item} targetPk=${ifDefined(this.target)}>
<ak-policy-binding-form slot="form" .binding=${item} targetPk=${ifDefined(this.target)} ?policyOnly=${this.policyOnly}>
</ak-policy-binding-form>
<button slot="trigger" class="pf-c-button pf-m-secondary">
${t`Edit Binding`}
@ -159,7 +162,7 @@ export class BoundPoliciesList extends Table<PolicyBinding> {
<span slot="header">
${t`Create Binding`}
</span>
<ak-policy-binding-form slot="form" targetPk=${ifDefined(this.target)}>
<ak-policy-binding-form slot="form" targetPk=${ifDefined(this.target)} ?policyOnly=${this.policyOnly}>
</ak-policy-binding-form>
<button slot="trigger" class="pf-c-button pf-m-primary">
${t`Create Binding`}
@ -208,7 +211,7 @@ export class BoundPoliciesList extends Table<PolicyBinding> {
<span slot="header">
${t`Create Binding`}
</span>
<ak-policy-binding-form slot="form" targetPk=${ifDefined(this.target)}>
<ak-policy-binding-form slot="form" targetPk=${ifDefined(this.target)} ?policyOnly=${this.policyOnly}>
</ak-policy-binding-form>
<button slot="trigger" class="pf-c-button pf-m-secondary">
${t`Create Binding`}

View File

@ -44,6 +44,9 @@ export class PolicyBindingForm extends Form<PolicyBinding> {
@property({type: Number})
policyGroupUser: target = target.policy;
@property({type: Boolean})
policyOnly = false;
getSuccessMessage(): string {
if (this.binding) {
return t`Successfully updated binding.`;
@ -60,10 +63,6 @@ export class PolicyBindingForm extends Form<PolicyBinding> {
`);
}
async customValidate(form: PolicyBinding): Promise<PolicyBinding> {
return form;
}
send = (data: PolicyBinding): Promise<PolicyBinding> => {
if (this.binding) {
return new PoliciesApi(DEFAULT_CONFIG).policiesBindingsUpdate({
@ -105,11 +104,18 @@ export class PolicyBindingForm extends Form<PolicyBinding> {
});
}
renderForm(): TemplateResult {
return html`<form class="pf-c-form pf-m-horizontal">
<div class="pf-c-card pf-m-selectable pf-m-selected">
<div class="pf-c-card__body">
<div class="pf-c-toggle-group">
renderModeSelector(): TemplateResult {
console.log(this.policyOnly);
if (this.policyOnly) {
this.policyGroupUser = target.policy;
return html`
<div class="pf-c-toggle-group__item">
<button class="pf-c-toggle-group__button pf-m-selected" type="button">
<span class="pf-c-toggle-group__text">${t`Policy`}</span>
</button>
</div>`;
}
return html`
<div class="pf-c-toggle-group__item">
<button class="pf-c-toggle-group__button ${this.policyGroupUser === target.policy ? "pf-m-selected": ""}" type="button" @click=${() => {
this.policyGroupUser = target.policy;
@ -132,7 +138,15 @@ export class PolicyBindingForm extends Form<PolicyBinding> {
}}>
<span class="pf-c-toggle-group__text">${t`User`}</span>
</button>
</div>
</div>`;
}
renderForm(): TemplateResult {
return html`<form class="pf-c-form pf-m-horizontal">
<div class="pf-c-card pf-m-selectable pf-m-selected">
<div class="pf-c-card__body">
<div class="pf-c-toggle-group">
${this.renderModeSelector()}
</div>
</div>
<div class="pf-c-card__footer">

View File

@ -146,9 +146,10 @@ export class OAuthSourceViewPage extends LitElement {
</section>
<div slot="page-policy-binding" data-tab-title="${t`Policy Bindings`}" class="pf-c-page__main-section pf-m-no-padding-mobile">
<div class="pf-c-card">
<div class="pf-c-card__title">${t`These bindings control which users can access this source.`}</div>
<div class="pf-c-card__title">${t`These bindings control which users can access this source.
You can only use policies here as access is checked before the user is authenticated.`}</div>
<div class="pf-c-card__body">
<ak-bound-policies-list .target=${this.source.pk}>
<ak-bound-policies-list .target=${this.source.pk} ?policyOnly=${true}>
</ak-bound-policies-list>
</div>
</div>

View File

@ -154,9 +154,10 @@ export class SAMLSourceViewPage extends LitElement {
</section>
<div slot="page-policy-bindings" data-tab-title="${t`Policy Bindings`}" class="pf-c-page__main-section pf-m-no-padding-mobile">
<div class="pf-c-card">
<div class="pf-c-card__title">${t`These bindings control which users can access this source.`}</div>
<div class="pf-c-card__title">${t`These bindings control which users can access this source.
You can only use policies here as access is checked before the user is authenticated.`}</div>
<div class="pf-c-card__body">
<ak-bound-policies-list .target=${this.source.pk}>
<ak-bound-policies-list .target=${this.source.pk} ?policyOnly=${true}>
</ak-bound-policies-list>
</div>
</div>