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-control"
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 <span class=
"input-group-append">
198 <button type=
"button"
199 class=
"btn btn-light"
200 cdPasswordButton=
"access_key">
202 <cd-copy-2-clipboard-button source=
"access_key">
203 </cd-copy-2-clipboard-button>
206 <span class=
"invalid-feedback"
207 *
ngIf=
"userForm.showError('access_key', frm, 'required')"
208 i18n
>This field is required.
</span>
213 <div class=
"form-group row"
214 *
ngIf=
"!editing && !userForm.getValue('generate_key')">
215 <label class=
"cd-col-form-label required"
217 i18n
>Secret key
</label>
218 <div class=
"cd-col-form-input">
219 <div class=
"input-group">
220 <input id=
"secret_key"
223 formControlName=
"secret_key">
224 <span class=
"input-group-append">
225 <button type=
"button"
226 class=
"btn btn-light"
227 cdPasswordButton=
"secret_key">
229 <cd-copy-2-clipboard-button source=
"secret_key">
230 </cd-copy-2-clipboard-button>
233 <span class=
"invalid-feedback"
234 *
ngIf=
"userForm.showError('secret_key', frm, 'required')"
235 i18n
>This field is required.
</span>
241 <fieldset *
ngIf=
"editing">
242 <legend i18n
>Subusers
</legend>
244 <div class=
"cd-col-form-offset">
245 <span *
ngIf=
"subusers.length === 0"
247 <span class=
"form-text text-muted"
248 i18n
>There are no subusers.
</span>
251 <span *
ngFor=
"let subuser of subusers; let i=index;">
252 <div class=
"input-group">
253 <div class=
"input-group-prepend">
254 <span class=
"input-group-text">
255 <i class=
"{{ icons.user }}"></i>
259 class=
"cd-form-control"
260 value=
"{{ subuser.id }}"
262 <div class=
"input-group-prepend border-left-0 border-right-0">
263 <span class=
"input-group-text">
264 <i class=
"{{ icons.share }}"></i>
268 class=
"cd-form-control"
269 value=
"{{ ('full-control' === subuser.permissions) ? 'full' : subuser.permissions }}"
271 <span class=
"input-group-append">
272 <button type=
"button"
273 class=
"btn btn-light tc_showSubuserButton"
276 (click)=
"showSubuserModal(i)">
277 <i [ngClass]=
"[icons.edit]"></i>
279 <button type=
"button"
280 class=
"btn btn-light tc_deleteSubuserButton"
283 (click)=
"deleteSubuser(i)">
284 <i [ngClass]=
"[icons.destroy]"></i>
288 <span class=
"form-text text-muted"></span>
293 <button type=
"button"
294 class=
"btn btn-light float-right tc_addSubuserButton"
295 (click)=
"showSubuserModal()">
296 <i [ngClass]=
"[icons.add]"></i>
297 <ng-container i18n
>{{ actionLabels.CREATE | titlecase }}
298 {{ subuserLabel | upperFirst }}
</ng-container>
302 <span class=
"help-block"></span>
308 <fieldset *
ngIf=
"editing">
309 <legend i18n
>Keys
</legend>
312 <div class=
"form-group row">
313 <label class=
"cd-col-form-label"
315 <div class=
"cd-col-form-input">
316 <span *
ngIf=
"s3Keys.length === 0"
318 <span class=
"form-text text-muted"
319 i18n
>There are no keys.
</span>
322 <span *
ngFor=
"let key of s3Keys; let i=index;">
323 <div class=
"input-group">
324 <div class=
"input-group-prepend">
325 <div class=
"input-group-text">
326 <i class=
"{{ icons.key }}"></i>
330 class=
"cd-form-control"
331 value=
"{{ key.user }}"
333 <span class=
"input-group-append">
334 <button type=
"button"
335 class=
"btn btn-light tc_showS3KeyButton"
338 (click)=
"showS3KeyModal(i)">
339 <i [ngClass]=
"[icons.show]"></i>
341 <button type=
"button"
342 class=
"btn btn-light tc_deleteS3KeyButton"
345 (click)=
"deleteS3Key(i)">
346 <i [ngClass]=
"[icons.destroy]"></i>
350 <span class=
"form-text text-muted"></span>
355 <button type=
"button"
356 class=
"btn btn-light float-right tc_addS3KeyButton"
357 (click)=
"showS3KeyModal()">
358 <i [ngClass]=
"[icons.add]"></i>
359 <ng-container i18n
>{{ actionLabels.CREATE | titlecase }}
360 {{ s3keyLabel | upperFirst }}
</ng-container>
365 <span class=
"help-block"></span>
372 <div class=
"form-group row">
373 <label class=
"cd-col-form-label"
376 <div class=
"cd-col-form-input">
377 <span *
ngIf=
"swiftKeys.length === 0"
379 <span class=
"form-text text-muted"
380 i18n
>There are no keys.
</span>
383 <span *
ngFor=
"let key of swiftKeys; let i=index;">
384 <div class=
"input-group">
385 <div class=
"input-group-prepend">
386 <span class=
"input-group-text">
387 <i class=
"{{ icons.key }}"></i>
391 class=
"cd-form-control"
392 value=
"{{ key.user }}"
394 <span class=
"input-group-append">
395 <button type=
"button"
396 class=
"btn btn-light tc_showSwiftKeyButton"
399 (click)=
"showSwiftKeyModal(i)">
400 <i [ngClass]=
"[icons.show]"></i>
404 <span class=
"form-text text-muted"></span>
410 <!-- Capabilities -->
411 <fieldset *
ngIf=
"editing">
412 <legend i18n
>Capabilities
</legend>
414 <div class=
"form-group row">
415 <div class=
"cd-col-form-offset">
416 <span *
ngIf=
"capabilities.length === 0"
418 <span class=
"form-text text-muted"
419 i18n
>There are no capabilities.
</span>
422 <span *
ngFor=
"let cap of capabilities; let i=index;">
423 <div class=
"input-group">
424 <span class=
"input-group-prepend">
425 <div class=
"input-group-text">
426 <i class=
"{{ icons.share }}"></i>
430 class=
"cd-form-control"
431 value=
"{{ cap.type }}:{{ cap.perm }}"
433 <span class=
"input-group-append">
434 <button type=
"button"
435 class=
"btn btn-light tc_editCapButton"
438 (click)=
"showCapabilityModal(i)">
439 <i [ngClass]=
"[icons.edit]"></i>
441 <button type=
"button"
442 class=
"btn btn-light tc_deleteCapButton"
445 (click)=
"deleteCapability(i)">
446 <i [ngClass]=
"[icons.destroy]"></i>
450 <span class=
"form-text text-muted"></span>
455 <button type=
"button"
456 class=
"btn btn-light float-right tc_addCapButton"
457 [disabled]=
"capabilities | pipeFunction:hasAllCapabilities"
459 ngbTooltip=
"All capabilities are already added."
460 [disableTooltip]=
"!(capabilities | pipeFunction:hasAllCapabilities)"
461 triggers=
"pointerenter:pointerleave"
462 (click)=
"showCapabilityModal()">
463 <i [ngClass]=
"[icons.add]"></i>
464 <ng-container i18n
>{{ actionLabels.ADD | titlecase }}
465 {{ capabilityLabel | upperFirst }}
</ng-container>
469 <span class=
"help-block"></span>
476 <legend i18n
>User quota
</legend>
479 <div class=
"form-group row">
480 <div class=
"cd-col-form-offset">
481 <div class=
"custom-control custom-checkbox">
482 <input class=
"custom-control-input"
483 id=
"user_quota_enabled"
485 formControlName=
"user_quota_enabled">
486 <label class=
"custom-control-label"
487 for=
"user_quota_enabled"
493 <!-- Unlimited size -->
494 <div class=
"form-group row"
495 *
ngIf=
"userForm.controls.user_quota_enabled.value">
496 <div class=
"cd-col-form-offset">
497 <div class=
"custom-control custom-checkbox">
498 <input class=
"custom-control-input"
499 id=
"user_quota_max_size_unlimited"
501 formControlName=
"user_quota_max_size_unlimited">
502 <label class=
"custom-control-label"
503 for=
"user_quota_max_size_unlimited"
504 i18n
>Unlimited size
</label>
509 <!-- Maximum size -->
510 <div class=
"form-group row"
511 *
ngIf=
"userForm.controls.user_quota_enabled.value && !userForm.getValue('user_quota_max_size_unlimited')">
512 <label class=
"cd-col-form-label required"
513 for=
"user_quota_max_size"
514 i18n
>Max. size
</label>
515 <div class=
"cd-col-form-input">
516 <input id=
"user_quota_max_size"
519 formControlName=
"user_quota_max_size"
521 <span class=
"invalid-feedback"
522 *
ngIf=
"userForm.showError('user_quota_max_size', frm, 'required')"
523 i18n
>This field is required.
</span>
524 <span class=
"invalid-feedback"
525 *
ngIf=
"userForm.showError('user_quota_max_size', frm, 'quotaMaxSize')"
526 i18n
>The value is not valid.
</span>
530 <!-- Unlimited objects -->
531 <div class=
"form-group row"
532 *
ngIf=
"userForm.controls.user_quota_enabled.value">
533 <div class=
"cd-col-form-offset">
534 <div class=
"custom-control custom-checkbox">
535 <input class=
"custom-control-input"
536 id=
"user_quota_max_objects_unlimited"
538 formControlName=
"user_quota_max_objects_unlimited">
539 <label class=
"custom-control-label"
540 for=
"user_quota_max_objects_unlimited"
541 i18n
>Unlimited objects
</label>
546 <!-- Maximum objects -->
547 <div class=
"form-group row"
548 *
ngIf=
"userForm.controls.user_quota_enabled.value && !userForm.getValue('user_quota_max_objects_unlimited')">
549 <label class=
"cd-col-form-label required"
550 for=
"user_quota_max_objects"
551 i18n
>Max. objects
</label>
552 <div class=
"cd-col-form-input">
553 <input id=
"user_quota_max_objects"
556 formControlName=
"user_quota_max_objects"
558 <span class=
"invalid-feedback"
559 *
ngIf=
"userForm.showError('user_quota_max_objects', frm, 'required')"
560 i18n
>This field is required.
</span>
561 <span class=
"invalid-feedback"
562 *
ngIf=
"userForm.showError('user_quota_max_objects', frm, 'min')"
563 i18n
>The entered value must be
>=
0.
</span>
568 <!-- Bucket quota -->
570 <legend i18n
>Bucket quota
</legend>
573 <div class=
"form-group row">
574 <div class=
"cd-col-form-offset">
575 <div class=
"custom-control custom-checkbox">
576 <input class=
"custom-control-input"
577 id=
"bucket_quota_enabled"
579 formControlName=
"bucket_quota_enabled">
580 <label class=
"custom-control-label"
581 for=
"bucket_quota_enabled"
587 <!-- Unlimited size -->
588 <div class=
"form-group row"
589 *
ngIf=
"userForm.controls.bucket_quota_enabled.value">
590 <div class=
"cd-col-form-offset">
591 <div class=
"custom-control custom-checkbox">
592 <input class=
"custom-control-input"
593 id=
"bucket_quota_max_size_unlimited"
595 formControlName=
"bucket_quota_max_size_unlimited">
596 <label class=
"custom-control-label"
597 for=
"bucket_quota_max_size_unlimited"
598 i18n
>Unlimited size
</label>
603 <!-- Maximum size -->
604 <div class=
"form-group row"
605 *
ngIf=
"userForm.controls.bucket_quota_enabled.value && !userForm.getValue('bucket_quota_max_size_unlimited')">
606 <label class=
"cd-col-form-label required"
607 for=
"bucket_quota_max_size"
608 i18n
>Max. size
</label>
609 <div class=
"cd-col-form-input">
610 <input id=
"bucket_quota_max_size"
613 formControlName=
"bucket_quota_max_size"
615 <span class=
"invalid-feedback"
616 *
ngIf=
"userForm.showError('bucket_quota_max_size', frm, 'required')"
617 i18n
>This field is required.
</span>
618 <span class=
"invalid-feedback"
619 *
ngIf=
"userForm.showError('bucket_quota_max_size', frm, 'quotaMaxSize')"
620 i18n
>The value is not valid.
</span>
624 <!-- Unlimited objects -->
625 <div class=
"form-group row"
626 *
ngIf=
"userForm.controls.bucket_quota_enabled.value">
627 <div class=
"cd-col-form-offset">
628 <div class=
"custom-control custom-checkbox">
629 <input class=
"custom-control-input"
630 id=
"bucket_quota_max_objects_unlimited"
632 formControlName=
"bucket_quota_max_objects_unlimited">
633 <label class=
"custom-control-label"
634 for=
"bucket_quota_max_objects_unlimited"
635 i18n
>Unlimited objects
</label>
640 <!-- Maximum objects -->
641 <div class=
"form-group row"
642 *
ngIf=
"userForm.controls.bucket_quota_enabled.value && !userForm.getValue('bucket_quota_max_objects_unlimited')">
643 <label class=
"cd-col-form-label required"
644 for=
"bucket_quota_max_objects"
645 i18n
>Max. objects
</label>
646 <div class=
"cd-col-form-input">
647 <input id=
"bucket_quota_max_objects"
650 formControlName=
"bucket_quota_max_objects"
652 <span class=
"invalid-feedback"
653 *
ngIf=
"userForm.showError('bucket_quota_max_objects', frm, 'required')"
654 i18n
>This field is required.
</span>
655 <span class=
"invalid-feedback"
656 *
ngIf=
"userForm.showError('bucket_quota_max_objects', frm, 'min')"
657 i18n
>The entered value must be
>=
0.
</span>
663 <div class=
"card-footer">
664 <cd-form-button-panel (submitActionEvent)=
"onSubmit()"
666 [submitText]=
"(action | titlecase) + ' ' + (resource | upperFirst)"
667 wrappingClass=
"text-right"></cd-form-button-panel>