1 <div class=
"cd-col-form"
2 *
cdFormLoading=
"loading">
8 class=
"card-header">{{ action | titlecase }} {{ resource | upperFirst }}
</div>
10 <div class=
"card-body">
12 <div class=
"form-group row">
13 <label class=
"cd-col-form-label"
14 [ngClass]=
"{'required': !editing}"
17 <div class=
"cd-col-form-input">
21 formControlName=
"user_id"
23 <span class=
"invalid-feedback"
24 *
ngIf=
"userForm.showError('user_id', frm, 'required')"
25 i18n
>This field is required.
</span>
26 <span class=
"invalid-feedback"
27 *
ngIf=
"userForm.showError('user_id', frm, 'pattern')"
28 i18n
>The value is not valid.
</span>
29 <span class=
"invalid-feedback"
30 *
ngIf=
"!userForm.getValue('show_tenant') && userForm.showError('user_id', frm, 'notUnique')"
31 i18n
>The chosen user ID is already in use.
</span>
36 <div class=
"form-group row">
37 <div class=
"cd-col-form-offset">
38 <div class=
"custom-control custom-checkbox">
39 <input class=
"custom-control-input"
42 (click)=
"updateFieldsWhenTenanted()"
43 formControlName=
"show_tenant"
45 <label class=
"custom-control-label"
47 i18n
>Show Tenant
</label>
53 <div class=
"form-group row"
54 *
ngIf=
"userForm.getValue('show_tenant')">
55 <label class=
"cd-col-form-label"
58 <div class=
"cd-col-form-input">
62 formControlName=
"tenant"
65 <span class=
"invalid-feedback"
66 *
ngIf=
"userForm.showError('tenant', frm, 'pattern')"
67 i18n
>The value is not valid.
</span>
68 <span class=
"invalid-feedback"
69 *
ngIf=
"userForm.showError('tenant', frm, 'notUnique')"
70 i18n
>The chosen user ID exists in this tenant.
</span>
75 <div class=
"form-group row">
76 <label class=
"cd-col-form-label"
77 [ngClass]=
"{'required': !editing}"
79 i18n
>Full name
</label>
80 <div class=
"cd-col-form-input">
81 <input id=
"display_name"
84 formControlName=
"display_name">
85 <span class=
"invalid-feedback"
86 *
ngIf=
"userForm.showError('display_name', frm, 'pattern')"
87 i18n
>The value is not valid.
</span>
88 <span class=
"invalid-feedback"
89 *
ngIf=
"userForm.showError('display_name', frm, 'required')"
90 i18n
>This field is required.
</span>
94 <!-- Email address -->
95 <div class=
"form-group row">
96 <label class=
"cd-col-form-label"
98 i18n
>Email address
</label>
99 <div class=
"cd-col-form-input">
103 formControlName=
"email">
104 <span class=
"invalid-feedback"
105 *
ngIf=
"userForm.showError('email', frm, 'email')"
106 i18n
>This is not a valid email address.
</span>
107 <span class=
"invalid-feedback"
108 *
ngIf=
"userForm.showError('email', frm, 'notUnique')"
109 i18n
>The chosen email address is already in use.
</span>
113 <!-- Max. buckets -->
114 <div class=
"form-group row">
115 <label class=
"cd-col-form-label"
116 for=
"max_buckets_mode"
117 i18n
>Max. buckets
</label>
118 <div class=
"cd-col-form-input">
119 <select class=
"form-select"
120 formControlName=
"max_buckets_mode"
121 name=
"max_buckets_mode"
122 id=
"max_buckets_mode"
123 (change)=
"onMaxBucketsModeChange($event.target.value)">
125 value=
"-1">Disabled
</option>
127 value=
"0">Unlimited
</option>
129 value=
"1">Custom
</option>
133 <div *
ngIf=
"1 == userForm.get('max_buckets_mode').value"
134 class=
"form-group row">
135 <label class=
"cd-col-form-label"></label>
136 <div class=
"cd-col-form-input">
137 <input id=
"max_buckets"
140 formControlName=
"max_buckets"
142 <span class=
"invalid-feedback"
143 *
ngIf=
"userForm.showError('max_buckets', frm, 'required')"
144 i18n
>This field is required.
</span>
145 <span class=
"invalid-feedback"
146 *
ngIf=
"userForm.showError('max_buckets', frm, 'min')"
147 i18n
>The entered value must be
>=
1.
</span>
152 <div class=
"form-group row">
153 <div class=
"cd-col-form-offset">
154 <div class=
"custom-control custom-checkbox">
155 <input class=
"custom-control-input"
158 formControlName=
"suspended">
159 <label class=
"custom-control-label"
161 i18n
>Suspended
</label>
167 <fieldset *
ngIf=
"!editing">
168 <legend i18n
>S3 key
</legend>
170 <!-- Auto-generate key -->
171 <div class=
"form-group row">
172 <div class=
"cd-col-form-offset">
173 <div class=
"custom-control custom-checkbox">
174 <input class=
"custom-control-input"
177 formControlName=
"generate_key">
178 <label class=
"custom-control-label"
180 i18n
>Auto-generate key
</label>
186 <div class=
"form-group row"
187 *
ngIf=
"!editing && !userForm.getValue('generate_key')">
188 <label class=
"cd-col-form-label required"
190 i18n
>Access key
</label>
191 <div class=
"cd-col-form-input">
192 <div class=
"input-group">
193 <input id=
"access_key"
196 formControlName=
"access_key">
197 <button type=
"button"
198 class=
"btn btn-light"
199 cdPasswordButton=
"access_key">
201 <cd-copy-2-clipboard-button source=
"access_key">
202 </cd-copy-2-clipboard-button>
204 <span class=
"invalid-feedback"
205 *
ngIf=
"userForm.showError('access_key', frm, 'required')"
206 i18n
>This field is required.
</span>
211 <div class=
"form-group row"
212 *
ngIf=
"!editing && !userForm.getValue('generate_key')">
213 <label class=
"cd-col-form-label required"
215 i18n
>Secret key
</label>
216 <div class=
"cd-col-form-input">
217 <div class=
"input-group">
218 <input id=
"secret_key"
221 formControlName=
"secret_key">
222 <button type=
"button"
223 class=
"btn btn-light"
224 cdPasswordButton=
"secret_key">
226 <cd-copy-2-clipboard-button source=
"secret_key">
227 </cd-copy-2-clipboard-button>
229 <span class=
"invalid-feedback"
230 *
ngIf=
"userForm.showError('secret_key', frm, 'required')"
231 i18n
>This field is required.
</span>
237 <fieldset *
ngIf=
"editing">
238 <legend i18n
>Subusers
</legend>
240 <div class=
"cd-col-form-offset">
241 <span *
ngIf=
"subusers.length === 0"
243 <span class=
"form-text text-muted"
244 i18n
>There are no subusers.
</span>
247 <span *
ngFor=
"let subuser of subusers; let i=index;">
248 <div class=
"input-group">
249 <span class=
"input-group-text">
250 <i class=
"{{ icons.user }}"></i>
253 class=
"cd-form-control"
254 value=
"{{ subuser.id }}"
256 <span class=
"input-group-text">
257 <i class=
"{{ icons.share }}"></i>
260 class=
"cd-form-control"
261 value=
"{{ ('full-control' === subuser.permissions) ? 'full' : subuser.permissions }}"
263 <button type=
"button"
264 class=
"btn btn-light tc_showSubuserButton"
267 (click)=
"showSubuserModal(i)">
268 <i [ngClass]=
"[icons.edit]"></i>
270 <button type=
"button"
271 class=
"btn btn-light tc_deleteSubuserButton"
274 (click)=
"deleteSubuser(i)">
275 <i [ngClass]=
"[icons.destroy]"></i>
278 <span class=
"form-text text-muted"></span>
281 <div class=
"row my-2">
283 <button type=
"button"
284 class=
"btn btn-light float-end tc_addSubuserButton"
285 (click)=
"showSubuserModal()">
286 <i [ngClass]=
"[icons.add]"></i>
287 <ng-container i18n
>{{ actionLabels.CREATE | titlecase }}
288 {{ subuserLabel | upperFirst }}
</ng-container>
292 <span class=
"help-block"></span>
298 <fieldset *
ngIf=
"editing">
299 <legend i18n
>Keys
</legend>
302 <div class=
"form-group row">
303 <label class=
"cd-col-form-label"
305 <div class=
"cd-col-form-input">
306 <span *
ngIf=
"s3Keys.length === 0"
308 <span class=
"form-text text-muted"
309 i18n
>There are no keys.
</span>
312 <span *
ngFor=
"let key of s3Keys; let i=index;">
313 <div class=
"input-group">
314 <div class=
"input-group-text">
315 <i class=
"{{ icons.key }}"></i>
318 class=
"cd-form-control"
319 value=
"{{ key.user }}"
321 <button type=
"button"
322 class=
"btn btn-light tc_showS3KeyButton"
325 (click)=
"showS3KeyModal(i)">
326 <i [ngClass]=
"[icons.show]"></i>
328 <button type=
"button"
329 class=
"btn btn-light tc_deleteS3KeyButton"
332 (click)=
"deleteS3Key(i)">
333 <i [ngClass]=
"[icons.destroy]"></i>
336 <span class=
"form-text text-muted"></span>
339 <div class=
"row my-2">
341 <button type=
"button"
342 class=
"btn btn-light float-end tc_addS3KeyButton"
343 (click)=
"showS3KeyModal()">
344 <i [ngClass]=
"[icons.add]"></i>
345 <ng-container i18n
>{{ actionLabels.CREATE | titlecase }}
346 {{ s3keyLabel | upperFirst }}
</ng-container>
351 <span class=
"help-block"></span>
358 <div class=
"form-group row">
359 <label class=
"cd-col-form-label"
362 <div class=
"cd-col-form-input">
363 <span *
ngIf=
"swiftKeys.length === 0"
365 <span class=
"form-text text-muted"
366 i18n
>There are no keys.
</span>
369 <span *
ngFor=
"let key of swiftKeys; let i=index;">
370 <div class=
"input-group">
371 <span class=
"input-group-text">
372 <i class=
"{{ icons.key }}"></i>
375 class=
"cd-form-control"
376 value=
"{{ key.user }}"
378 <button type=
"button"
379 class=
"btn btn-light tc_showSwiftKeyButton"
382 (click)=
"showSwiftKeyModal(i)">
383 <i [ngClass]=
"[icons.show]"></i>
386 <span class=
"form-text text-muted"></span>
392 <!-- Capabilities -->
393 <fieldset *
ngIf=
"editing">
394 <legend i18n
>Capabilities
</legend>
396 <div class=
"form-group row">
397 <div class=
"cd-col-form-offset">
398 <span *
ngIf=
"capabilities.length === 0"
400 <span class=
"form-text text-muted"
401 i18n
>There are no capabilities.
</span>
404 <span *
ngFor=
"let cap of capabilities; let i=index;">
405 <div class=
"input-group">
406 <div class=
"input-group-text">
407 <i class=
"{{ icons.share }}"></i>
410 class=
"cd-form-control"
411 value=
"{{ cap.type }}:{{ cap.perm }}"
413 <button type=
"button"
414 class=
"btn btn-light tc_editCapButton"
417 (click)=
"showCapabilityModal(i)">
418 <i [ngClass]=
"[icons.edit]"></i>
420 <button type=
"button"
421 class=
"btn btn-light tc_deleteCapButton"
424 (click)=
"deleteCapability(i)">
425 <i [ngClass]=
"[icons.destroy]"></i>
428 <span class=
"form-text text-muted"></span>
431 <div class=
"row my-2">
433 <button type=
"button"
434 class=
"btn btn-light float-end tc_addCapButton"
435 [disabled]=
"capabilities | pipeFunction:hasAllCapabilities"
437 ngbTooltip=
"All capabilities are already added."
438 [disableTooltip]=
"!(capabilities | pipeFunction:hasAllCapabilities)"
439 triggers=
"pointerenter:pointerleave"
440 (click)=
"showCapabilityModal()">
441 <i [ngClass]=
"[icons.add]"></i>
442 <ng-container i18n
>{{ actionLabels.ADD | titlecase }}
443 {{ capabilityLabel | upperFirst }}
</ng-container>
447 <span class=
"help-block"></span>
454 <legend i18n
>User quota
</legend>
457 <div class=
"form-group row">
458 <div class=
"cd-col-form-offset">
459 <div class=
"custom-control custom-checkbox">
460 <input class=
"custom-control-input"
461 id=
"user_quota_enabled"
463 formControlName=
"user_quota_enabled">
464 <label class=
"custom-control-label"
465 for=
"user_quota_enabled"
471 <!-- Unlimited size -->
472 <div class=
"form-group row"
473 *
ngIf=
"userForm.controls.user_quota_enabled.value">
474 <div class=
"cd-col-form-offset">
475 <div class=
"custom-control custom-checkbox">
476 <input class=
"custom-control-input"
477 id=
"user_quota_max_size_unlimited"
479 formControlName=
"user_quota_max_size_unlimited">
480 <label class=
"custom-control-label"
481 for=
"user_quota_max_size_unlimited"
482 i18n
>Unlimited size
</label>
487 <!-- Maximum size -->
488 <div class=
"form-group row"
489 *
ngIf=
"userForm.controls.user_quota_enabled.value && !userForm.getValue('user_quota_max_size_unlimited')">
490 <label class=
"cd-col-form-label required"
491 for=
"user_quota_max_size"
492 i18n
>Max. size
</label>
493 <div class=
"cd-col-form-input">
494 <input id=
"user_quota_max_size"
497 formControlName=
"user_quota_max_size"
499 <span class=
"invalid-feedback"
500 *
ngIf=
"userForm.showError('user_quota_max_size', frm, 'required')"
501 i18n
>This field is required.
</span>
502 <span class=
"invalid-feedback"
503 *
ngIf=
"userForm.showError('user_quota_max_size', frm, 'quotaMaxSize')"
504 i18n
>The value is not valid.
</span>
508 <!-- Unlimited objects -->
509 <div class=
"form-group row"
510 *
ngIf=
"userForm.controls.user_quota_enabled.value">
511 <div class=
"cd-col-form-offset">
512 <div class=
"custom-control custom-checkbox">
513 <input class=
"custom-control-input"
514 id=
"user_quota_max_objects_unlimited"
516 formControlName=
"user_quota_max_objects_unlimited">
517 <label class=
"custom-control-label"
518 for=
"user_quota_max_objects_unlimited"
519 i18n
>Unlimited objects
</label>
524 <!-- Maximum objects -->
525 <div class=
"form-group row"
526 *
ngIf=
"userForm.controls.user_quota_enabled.value && !userForm.getValue('user_quota_max_objects_unlimited')">
527 <label class=
"cd-col-form-label required"
528 for=
"user_quota_max_objects"
529 i18n
>Max. objects
</label>
530 <div class=
"cd-col-form-input">
531 <input id=
"user_quota_max_objects"
534 formControlName=
"user_quota_max_objects"
536 <span class=
"invalid-feedback"
537 *
ngIf=
"userForm.showError('user_quota_max_objects', frm, 'required')"
538 i18n
>This field is required.
</span>
539 <span class=
"invalid-feedback"
540 *
ngIf=
"userForm.showError('user_quota_max_objects', frm, 'min')"
541 i18n
>The entered value must be
>=
0.
</span>
546 <!-- Bucket quota -->
548 <legend i18n
>Bucket quota
</legend>
551 <div class=
"form-group row">
552 <div class=
"cd-col-form-offset">
553 <div class=
"custom-control custom-checkbox">
554 <input class=
"custom-control-input"
555 id=
"bucket_quota_enabled"
557 formControlName=
"bucket_quota_enabled">
558 <label class=
"custom-control-label"
559 for=
"bucket_quota_enabled"
565 <!-- Unlimited size -->
566 <div class=
"form-group row"
567 *
ngIf=
"userForm.controls.bucket_quota_enabled.value">
568 <div class=
"cd-col-form-offset">
569 <div class=
"custom-control custom-checkbox">
570 <input class=
"custom-control-input"
571 id=
"bucket_quota_max_size_unlimited"
573 formControlName=
"bucket_quota_max_size_unlimited">
574 <label class=
"custom-control-label"
575 for=
"bucket_quota_max_size_unlimited"
576 i18n
>Unlimited size
</label>
581 <!-- Maximum size -->
582 <div class=
"form-group row"
583 *
ngIf=
"userForm.controls.bucket_quota_enabled.value && !userForm.getValue('bucket_quota_max_size_unlimited')">
584 <label class=
"cd-col-form-label required"
585 for=
"bucket_quota_max_size"
586 i18n
>Max. size
</label>
587 <div class=
"cd-col-form-input">
588 <input id=
"bucket_quota_max_size"
591 formControlName=
"bucket_quota_max_size"
593 <span class=
"invalid-feedback"
594 *
ngIf=
"userForm.showError('bucket_quota_max_size', frm, 'required')"
595 i18n
>This field is required.
</span>
596 <span class=
"invalid-feedback"
597 *
ngIf=
"userForm.showError('bucket_quota_max_size', frm, 'quotaMaxSize')"
598 i18n
>The value is not valid.
</span>
602 <!-- Unlimited objects -->
603 <div class=
"form-group row"
604 *
ngIf=
"userForm.controls.bucket_quota_enabled.value">
605 <div class=
"cd-col-form-offset">
606 <div class=
"custom-control custom-checkbox">
607 <input class=
"custom-control-input"
608 id=
"bucket_quota_max_objects_unlimited"
610 formControlName=
"bucket_quota_max_objects_unlimited">
611 <label class=
"custom-control-label"
612 for=
"bucket_quota_max_objects_unlimited"
613 i18n
>Unlimited objects
</label>
618 <!-- Maximum objects -->
619 <div class=
"form-group row"
620 *
ngIf=
"userForm.controls.bucket_quota_enabled.value && !userForm.getValue('bucket_quota_max_objects_unlimited')">
621 <label class=
"cd-col-form-label required"
622 for=
"bucket_quota_max_objects"
623 i18n
>Max. objects
</label>
624 <div class=
"cd-col-form-input">
625 <input id=
"bucket_quota_max_objects"
628 formControlName=
"bucket_quota_max_objects"
630 <span class=
"invalid-feedback"
631 *
ngIf=
"userForm.showError('bucket_quota_max_objects', frm, 'required')"
632 i18n
>This field is required.
</span>
633 <span class=
"invalid-feedback"
634 *
ngIf=
"userForm.showError('bucket_quota_max_objects', frm, 'min')"
635 i18n
>The entered value must be
>=
0.
</span>
641 <div class=
"card-footer">
642 <cd-form-button-panel (submitActionEvent)=
"onSubmit()"
644 [submitText]=
"(action | titlecase) + ' ' + (resource | upperFirst)"
645 wrappingClass=
"text-right"></cd-form-button-panel>