View | Details | Raw Unified | Return to bug 1567 | Differences between
and this patch

Collapse All | Expand All

(-)a/management/univention-directory-manager-modules/modules/univention/admin/__init__.py (-1 / +3 lines)
 Lines 198-204   def __init__( Link Here 
198
		include_in_default_search=False,
198
		include_in_default_search=False,
199
		nonempty_is_default=False,
199
		nonempty_is_default=False,
200
		readonly_when_synced=False,
200
		readonly_when_synced=False,
201
		size=None):
201
		size=None,
202
		copyable=False):
202
203
203
		self.short_description = short_description
204
		self.short_description = short_description
204
		self.long_description = long_description
205
		self.long_description = long_description
 Lines 228-233   def __init__( Link Here 
228
		self.nonempty_is_default = nonempty_is_default
229
		self.nonempty_is_default = nonempty_is_default
229
		self.readonly_when_synced = readonly_when_synced
230
		self.readonly_when_synced = readonly_when_synced
230
		self.size = size
231
		self.size = size
232
		self.copyable = copyable
231
233
232
	def new(self):
234
	def new(self):
233
		if self.multivalue:
235
		if self.multivalue:
(-)a/management/univention-directory-manager-modules/modules/univention/admin/handlers/users/user.py (-5 / +69 lines)
 Lines 73-79   class vacationResendDays(univention.admin.syntax.select): Link Here 
73
73
74
74
75
module = 'users/user'
75
module = 'users/user'
76
operations = ['add', 'edit', 'remove', 'search', 'move']
76
operations = ['add', 'edit', 'remove', 'search', 'move', 'copy']
77
template = 'settings/usertemplate'
77
template = 'settings/usertemplate'
78
uid_umlauts_mixedcase = 0
78
uid_umlauts_mixedcase = 0
79
79
 Lines 168-173   class vacationResendDays(univention.admin.syntax.select): Link Here 
168
		may_change=True,
168
		may_change=True,
169
		identifies=False,
169
		identifies=False,
170
		readonly_when_synced=True,
170
		readonly_when_synced=True,
171
		copyable=True,
171
	),
172
	),
172
	'lastname': univention.admin.property(
173
	'lastname': univention.admin.property(
173
		short_description=_('Last name'),
174
		short_description=_('Last name'),
 Lines 179-184   class vacationResendDays(univention.admin.syntax.select): Link Here 
179
		may_change=True,
180
		may_change=True,
180
		identifies=False,
181
		identifies=False,
181
		readonly_when_synced=True,
182
		readonly_when_synced=True,
183
		copyable=True,
182
	),
184
	),
183
	'gecos': univention.admin.property(
185
	'gecos': univention.admin.property(
184
		short_description=_('GECOS'),
186
		short_description=_('GECOS'),
 Lines 190-196   class vacationResendDays(univention.admin.syntax.select): Link Here 
190
		may_change=True,
192
		may_change=True,
191
		default='<firstname> <lastname><:umlauts,strip>',
193
		default='<firstname> <lastname><:umlauts,strip>',
192
		identifies=False,
194
		identifies=False,
193
		dontsearch=True
195
		dontsearch=True,
196
		copyable=True,
194
	),
197
	),
195
	'displayName': univention.admin.property(
198
	'displayName': univention.admin.property(
196
		short_description=_('Display name'),
199
		short_description=_('Display name'),
 Lines 203-208   class vacationResendDays(univention.admin.syntax.select): Link Here 
203
		default='<firstname> <lastname><:strip>',
206
		default='<firstname> <lastname><:strip>',
204
		identifies=False,
207
		identifies=False,
205
		readonly_when_synced=True,
208
		readonly_when_synced=True,
209
		copyable=True,
206
	),
210
	),
207
	'title': univention.admin.property(
211
	'title': univention.admin.property(
208
		short_description=_('Title'),
212
		short_description=_('Title'),
 Lines 214-219   class vacationResendDays(univention.admin.syntax.select): Link Here 
214
		may_change=True,
218
		may_change=True,
215
		identifies=False,
219
		identifies=False,
216
		readonly_when_synced=True,
220
		readonly_when_synced=True,
221
		copyable=True,
217
	),
222
	),
218
	'sambaPrivileges': univention.admin.property(
223
	'sambaPrivileges': univention.admin.property(
219
		short_description=_('Samba privilege'),
224
		short_description=_('Samba privilege'),
 Lines 226-231   class vacationResendDays(univention.admin.syntax.select): Link Here 
226
		may_change=True,
231
		may_change=True,
227
		identifies=False,
232
		identifies=False,
228
		readonly_when_synced=True,
233
		readonly_when_synced=True,
234
		copyable=True,
229
	),
235
	),
230
	'description': univention.admin.property(
236
	'description': univention.admin.property(
231
		short_description=_('Description'),
237
		short_description=_('Description'),
 Lines 237-242   class vacationResendDays(univention.admin.syntax.select): Link Here 
237
		may_change=True,
243
		may_change=True,
238
		identifies=False,
244
		identifies=False,
239
		readonly_when_synced=True,
245
		readonly_when_synced=True,
246
		copyable=True,
240
	),
247
	),
241
	'organisation': univention.admin.property(
248
	'organisation': univention.admin.property(
242
		short_description=_('Organisation'),
249
		short_description=_('Organisation'),
 Lines 248-253   class vacationResendDays(univention.admin.syntax.select): Link Here 
248
		may_change=True,
255
		may_change=True,
249
		identifies=False,
256
		identifies=False,
250
		readonly_when_synced=True,
257
		readonly_when_synced=True,
258
		copyable=True,
251
	),
259
	),
252
	'userexpiry': univention.admin.property(
260
	'userexpiry': univention.admin.property(
253
		short_description=_('Account expiry date'),
261
		short_description=_('Account expiry date'),
 Lines 259-264   class vacationResendDays(univention.admin.syntax.select): Link Here 
259
		may_change=True,
267
		may_change=True,
260
		dontsearch=True,
268
		dontsearch=True,
261
		identifies=False,
269
		identifies=False,
270
		copyable=True,
262
	),
271
	),
263
	'passwordexpiry': univention.admin.property(
272
	'passwordexpiry': univention.admin.property(
264
		short_description=_('Password expiry date'),
273
		short_description=_('Password expiry date'),
 Lines 272-277   class vacationResendDays(univention.admin.syntax.select): Link Here 
272
		dontsearch=True,
281
		dontsearch=True,
273
		identifies=False,
282
		identifies=False,
274
		readonly_when_synced=True,
283
		readonly_when_synced=True,
284
		copyable=True,
275
	),
285
	),
276
	'pwdChangeNextLogin': univention.admin.property(
286
	'pwdChangeNextLogin': univention.admin.property(
277
		short_description=_('Change password on next login'),
287
		short_description=_('Change password on next login'),
 Lines 294-300   class vacationResendDays(univention.admin.syntax.select): Link Here 
294
		required=False,
304
		required=False,
295
		may_change=True,
305
		may_change=True,
296
		identifies=False,
306
		identifies=False,
297
		show_in_lists=True
307
		show_in_lists=True,
308
		copyable=True,
298
	),
309
	),
299
	'locked': univention.admin.property(
310
	'locked': univention.admin.property(
300
		short_description=_('Locked login methods'),
311
		short_description=_('Locked login methods'),
 Lines 329-334   class vacationResendDays(univention.admin.syntax.select): Link Here 
329
		may_change=True,
340
		may_change=True,
330
		identifies=False,
341
		identifies=False,
331
		readonly_when_synced=True,
342
		readonly_when_synced=True,
343
		copyable=True,
332
	),
344
	),
333
	'e-mail': univention.admin.property(
345
	'e-mail': univention.admin.property(
334
		short_description=_('E-mail address'),
346
		short_description=_('E-mail address'),
 Lines 339-345   class vacationResendDays(univention.admin.syntax.select): Link Here 
339
		required=False,
351
		required=False,
340
		may_change=True,
352
		may_change=True,
341
		identifies=False,
353
		identifies=False,
342
		default=['<mailPrimaryAddress>']
354
		default=['<mailPrimaryAddress>'],
355
		copyable=True,
343
	),
356
	),
344
	'postcode': univention.admin.property(
357
	'postcode': univention.admin.property(
345
		short_description=_('Postal code'),
358
		short_description=_('Postal code'),
 Lines 351-356   class vacationResendDays(univention.admin.syntax.select): Link Here 
351
		may_change=True,
364
		may_change=True,
352
		identifies=False,
365
		identifies=False,
353
		readonly_when_synced=True,
366
		readonly_when_synced=True,
367
		copyable=True,
354
	),
368
	),
355
	'city': univention.admin.property(
369
	'city': univention.admin.property(
356
		short_description=_('City'),
370
		short_description=_('City'),
 Lines 362-367   class vacationResendDays(univention.admin.syntax.select): Link Here 
362
		may_change=True,
376
		may_change=True,
363
		identifies=False,
377
		identifies=False,
364
		readonly_when_synced=True,
378
		readonly_when_synced=True,
379
		copyable=True,
365
	),
380
	),
366
	'country': univention.admin.property(
381
	'country': univention.admin.property(
367
		short_description=_('Country'),
382
		short_description=_('Country'),
 Lines 373-378   class vacationResendDays(univention.admin.syntax.select): Link Here 
373
		may_change=True,
388
		may_change=True,
374
		identifies=False,
389
		identifies=False,
375
		readonly_when_synced=True,
390
		readonly_when_synced=True,
391
		copyable=True,
376
	),
392
	),
377
	'phone': univention.admin.property(
393
	'phone': univention.admin.property(
378
		short_description=_('Telephone number'),
394
		short_description=_('Telephone number'),
 Lines 384-389   class vacationResendDays(univention.admin.syntax.select): Link Here 
384
		may_change=True,
400
		may_change=True,
385
		identifies=False,
401
		identifies=False,
386
		readonly_when_synced=True,
402
		readonly_when_synced=True,
403
		copyable=True,
387
	),
404
	),
388
	'employeeNumber': univention.admin.property(
405
	'employeeNumber': univention.admin.property(
389
		short_description=_('Employee number'),
406
		short_description=_('Employee number'),
 Lines 395-400   class vacationResendDays(univention.admin.syntax.select): Link Here 
395
		required=False,
412
		required=False,
396
		may_change=True,
413
		may_change=True,
397
		identifies=False,
414
		identifies=False,
415
		copyable=True,
398
	),
416
	),
399
	'roomNumber': univention.admin.property(
417
	'roomNumber': univention.admin.property(
400
		short_description=_('Room number'),
418
		short_description=_('Room number'),
 Lines 405-410   class vacationResendDays(univention.admin.syntax.select): Link Here 
405
		required=False,
423
		required=False,
406
		may_change=True,
424
		may_change=True,
407
		identifies=False,
425
		identifies=False,
426
		copyable=True,
408
	),
427
	),
409
	'secretary': univention.admin.property(
428
	'secretary': univention.admin.property(
410
		short_description=_('Superior'),
429
		short_description=_('Superior'),
 Lines 415-420   class vacationResendDays(univention.admin.syntax.select): Link Here 
415
		required=False,
434
		required=False,
416
		may_change=True,
435
		may_change=True,
417
		identifies=False,
436
		identifies=False,
437
		copyable=True,
418
	),
438
	),
419
	'departmentNumber': univention.admin.property(
439
	'departmentNumber': univention.admin.property(
420
		short_description=_('Department number'),
440
		short_description=_('Department number'),
 Lines 425-430   class vacationResendDays(univention.admin.syntax.select): Link Here 
425
		required=False,
445
		required=False,
426
		may_change=True,
446
		may_change=True,
427
		identifies=False,
447
		identifies=False,
448
		copyable=True,
428
	),
449
	),
429
	'employeeType': univention.admin.property(
450
	'employeeType': univention.admin.property(
430
		short_description=_('Employee type'),
451
		short_description=_('Employee type'),
 Lines 435-440   class vacationResendDays(univention.admin.syntax.select): Link Here 
435
		required=False,
456
		required=False,
436
		may_change=True,
457
		may_change=True,
437
		identifies=False,
458
		identifies=False,
459
		copyable=True,
438
	),
460
	),
439
	'homePostalAddress': univention.admin.property(
461
	'homePostalAddress': univention.admin.property(
440
		short_description=_('Private postal address'),
462
		short_description=_('Private postal address'),
 Lines 445-450   class vacationResendDays(univention.admin.syntax.select): Link Here 
445
		required=False,
467
		required=False,
446
		may_change=True,
468
		may_change=True,
447
		identifies=False,
469
		identifies=False,
470
		copyable=True,
448
	),
471
	),
449
	'homeTelephoneNumber': univention.admin.property(
472
	'homeTelephoneNumber': univention.admin.property(
450
		short_description=_('Private telephone number'),
473
		short_description=_('Private telephone number'),
 Lines 456-461   class vacationResendDays(univention.admin.syntax.select): Link Here 
456
		may_change=True,
479
		may_change=True,
457
		identifies=False,
480
		identifies=False,
458
		readonly_when_synced=True,
481
		readonly_when_synced=True,
482
		copyable=True,
459
	),
483
	),
460
	'mobileTelephoneNumber': univention.admin.property(
484
	'mobileTelephoneNumber': univention.admin.property(
461
		short_description=_('Mobile phone number'),
485
		short_description=_('Mobile phone number'),
 Lines 467-472   class vacationResendDays(univention.admin.syntax.select): Link Here 
467
		may_change=True,
491
		may_change=True,
468
		identifies=False,
492
		identifies=False,
469
		readonly_when_synced=True,
493
		readonly_when_synced=True,
494
		copyable=True,
470
	),
495
	),
471
	'pagerTelephoneNumber': univention.admin.property(
496
	'pagerTelephoneNumber': univention.admin.property(
472
		short_description=_('Pager telephone number'),
497
		short_description=_('Pager telephone number'),
 Lines 478-483   class vacationResendDays(univention.admin.syntax.select): Link Here 
478
		may_change=True,
503
		may_change=True,
479
		identifies=False,
504
		identifies=False,
480
		readonly_when_synced=True,
505
		readonly_when_synced=True,
506
		copyable=True,
481
	),
507
	),
482
	'birthday': univention.admin.property(
508
	'birthday': univention.admin.property(
483
		short_description=_('Birthdate'),
509
		short_description=_('Birthdate'),
 Lines 488-493   class vacationResendDays(univention.admin.syntax.select): Link Here 
488
		required=False,
514
		required=False,
489
		may_change=True,
515
		may_change=True,
490
		identifies=False,
516
		identifies=False,
517
		copyable=True,
491
	),
518
	),
492
	'unixhome': univention.admin.property(
519
	'unixhome': univention.admin.property(
493
		short_description=_('Unix home directory'),
520
		short_description=_('Unix home directory'),
 Lines 510-516   class vacationResendDays(univention.admin.syntax.select): Link Here 
510
		required=False,
537
		required=False,
511
		may_change=True,
538
		may_change=True,
512
		identifies=False,
539
		identifies=False,
513
		default='/bin/bash'
540
		default='/bin/bash',
541
		copyable=True,
514
	),
542
	),
515
	'sambahome': univention.admin.property(
543
	'sambahome': univention.admin.property(
516
		short_description=_('Windows home path'),
544
		short_description=_('Windows home path'),
 Lines 522-527   class vacationResendDays(univention.admin.syntax.select): Link Here 
522
		may_change=True,
550
		may_change=True,
523
		identifies=False,
551
		identifies=False,
524
		readonly_when_synced=True,
552
		readonly_when_synced=True,
553
		copyable=True,
525
	),
554
	),
526
	'scriptpath': univention.admin.property(
555
	'scriptpath': univention.admin.property(
527
		short_description=_('Windows logon script'),
556
		short_description=_('Windows logon script'),
 Lines 533-538   class vacationResendDays(univention.admin.syntax.select): Link Here 
533
		may_change=True,
562
		may_change=True,
534
		identifies=False,
563
		identifies=False,
535
		readonly_when_synced=True,
564
		readonly_when_synced=True,
565
		copyable=True,
536
	),
566
	),
537
	'profilepath': univention.admin.property(
567
	'profilepath': univention.admin.property(
538
		short_description=_('Windows profile directory'),
568
		short_description=_('Windows profile directory'),
 Lines 544-549   class vacationResendDays(univention.admin.syntax.select): Link Here 
544
		may_change=True,
574
		may_change=True,
545
		identifies=False,
575
		identifies=False,
546
		readonly_when_synced=True,
576
		readonly_when_synced=True,
577
		copyable=True,
547
	),
578
	),
548
	'homedrive': univention.admin.property(
579
	'homedrive': univention.admin.property(
549
		short_description=_('Windows home drive'),
580
		short_description=_('Windows home drive'),
 Lines 555-560   class vacationResendDays(univention.admin.syntax.select): Link Here 
555
		may_change=True,
586
		may_change=True,
556
		identifies=False,
587
		identifies=False,
557
		readonly_when_synced=True,
588
		readonly_when_synced=True,
589
		copyable=True,
558
	),
590
	),
559
	'sambaRID': univention.admin.property(
591
	'sambaRID': univention.admin.property(
560
		short_description=_('Relative ID'),
592
		short_description=_('Relative ID'),
 Lines 579-584   class vacationResendDays(univention.admin.syntax.select): Link Here 
579
		may_change=True,
611
		may_change=True,
580
		identifies=False,
612
		identifies=False,
581
		readonly_when_synced=True,
613
		readonly_when_synced=True,
614
		copyable=True,
582
	),
615
	),
583
	'primaryGroup': univention.admin.property(
616
	'primaryGroup': univention.admin.property(
584
		short_description=_('Primary group'),
617
		short_description=_('Primary group'),
 Lines 591-596   class vacationResendDays(univention.admin.syntax.select): Link Here 
591
		may_change=True,
624
		may_change=True,
592
		identifies=False,
625
		identifies=False,
593
		readonly_when_synced=True,
626
		readonly_when_synced=True,
627
		copyable=True,
594
	),
628
	),
595
	'mailHomeServer': univention.admin.property(
629
	'mailHomeServer': univention.admin.property(
596
		short_description=_('Mail home server'),
630
		short_description=_('Mail home server'),
 Lines 603-608   class vacationResendDays(univention.admin.syntax.select): Link Here 
603
		dontsearch=False,
637
		dontsearch=False,
604
		may_change=True,
638
		may_change=True,
605
		identifies=False,
639
		identifies=False,
640
		copyable=True,
606
	),
641
	),
607
	'mailPrimaryAddress': univention.admin.property(
642
	'mailPrimaryAddress': univention.admin.property(
608
		short_description=_('Primary e-mail address'),
643
		short_description=_('Primary e-mail address'),
 Lines 628-633   class vacationResendDays(univention.admin.syntax.select): Link Here 
628
		may_change=True,
663
		may_change=True,
629
		identifies=False,
664
		identifies=False,
630
		readonly_when_synced=False,
665
		readonly_when_synced=False,
666
		copyable=True,
631
	),
667
	),
632
	'externalMailAlias': univention.admin.property(
668
	'externalMailAlias': univention.admin.property(
633
		short_description=_('External e-mail address'),
669
		short_description=_('External e-mail address'),
 Lines 640-645   class vacationResendDays(univention.admin.syntax.select): Link Here 
640
		may_change=True,
676
		may_change=True,
641
		identifies=False,
677
		identifies=False,
642
		readonly_when_synced=False,
678
		readonly_when_synced=False,
679
		copyable=True,
643
	),
680
	),
644
	'externalMailAliasCopyToSelf': univention.admin.property(
681
	'externalMailAliasCopyToSelf': univention.admin.property(
645
		short_description=_('Copy to the primary e-mail address'),
682
		short_description=_('Copy to the primary e-mail address'),
 Lines 652-657   class vacationResendDays(univention.admin.syntax.select): Link Here 
652
		may_change=True,
689
		may_change=True,
653
		identifies=False,
690
		identifies=False,
654
		readonly_when_synced=False,
691
		readonly_when_synced=False,
692
		copyable=True,
655
	),
693
	),
656
	'overridePWHistory': univention.admin.property(
694
	'overridePWHistory': univention.admin.property(
657
		short_description=_('Override password history'),
695
		short_description=_('Override password history'),
 Lines 664-669   class vacationResendDays(univention.admin.syntax.select): Link Here 
664
		may_change=True,
702
		may_change=True,
665
		identifies=False,
703
		identifies=False,
666
		readonly_when_synced=True,
704
		readonly_when_synced=True,
705
		copyable=True,
667
	),
706
	),
668
	'overridePWLength': univention.admin.property(
707
	'overridePWLength': univention.admin.property(
669
		short_description=_('Override password check'),
708
		short_description=_('Override password check'),
 Lines 676-681   class vacationResendDays(univention.admin.syntax.select): Link Here 
676
		may_change=True,
715
		may_change=True,
677
		identifies=False,
716
		identifies=False,
678
		readonly_when_synced=True,
717
		readonly_when_synced=True,
718
		copyable=True,
679
	),
719
	),
680
	'homeShare': univention.admin.property(
720
	'homeShare': univention.admin.property(
681
		short_description=_('Home share'),
721
		short_description=_('Home share'),
 Lines 687-692   class vacationResendDays(univention.admin.syntax.select): Link Here 
687
		dontsearch=True,
727
		dontsearch=True,
688
		may_change=True,
728
		may_change=True,
689
		identifies=False,
729
		identifies=False,
730
		copyable=True,
690
	),
731
	),
691
	'homeSharePath': univention.admin.property(
732
	'homeSharePath': univention.admin.property(
692
		short_description=_('Home share path'),
733
		short_description=_('Home share path'),
 Lines 711-716   class vacationResendDays(univention.admin.syntax.select): Link Here 
711
		may_change=True,
752
		may_change=True,
712
		identifies=False,
753
		identifies=False,
713
		readonly_when_synced=True,
754
		readonly_when_synced=True,
755
		copyable=True,
714
	),
756
	),
715
	'sambaLogonHours': univention.admin.property(
757
	'sambaLogonHours': univention.admin.property(
716
		short_description=_('Permitted times for Windows logins'),
758
		short_description=_('Permitted times for Windows logins'),
 Lines 723-728   class vacationResendDays(univention.admin.syntax.select): Link Here 
723
		may_change=True,
765
		may_change=True,
724
		identifies=False,
766
		identifies=False,
725
		readonly_when_synced=True,
767
		readonly_when_synced=True,
768
		copyable=True,
726
	),
769
	),
727
	'jpegPhoto': univention.admin.property(
770
	'jpegPhoto': univention.admin.property(
728
		short_description=_("Picture of the user (JPEG format)"),
771
		short_description=_("Picture of the user (JPEG format)"),
 Lines 734-739   class vacationResendDays(univention.admin.syntax.select): Link Here 
734
		may_change=True,
777
		may_change=True,
735
		options=['person'],
778
		options=['person'],
736
		identifies=False,
779
		identifies=False,
780
		copyable=True,
737
	),
781
	),
738
	'userCertificate': univention.admin.property(
782
	'userCertificate': univention.admin.property(
739
		short_description=_("PKI user certificate (DER format)"),
783
		short_description=_("PKI user certificate (DER format)"),
 Lines 745-750   class vacationResendDays(univention.admin.syntax.select): Link Here 
745
		may_change=True,
789
		may_change=True,
746
		options=['pki'],
790
		options=['pki'],
747
		identifies=False,
791
		identifies=False,
792
		copyable=True,
748
	),
793
	),
749
	'certificateIssuerCountry': univention.admin.property(
794
	'certificateIssuerCountry': univention.admin.property(
750
		short_description=_('Issuer Country'),
795
		short_description=_('Issuer Country'),
 Lines 756-761   class vacationResendDays(univention.admin.syntax.select): Link Here 
756
		editable=False,
801
		editable=False,
757
		options=['pki'],
802
		options=['pki'],
758
		identifies=False,
803
		identifies=False,
804
		copyable=True,
759
	),
805
	),
760
	'certificateIssuerState': univention.admin.property(
806
	'certificateIssuerState': univention.admin.property(
761
		short_description=_('Issuer State'),
807
		short_description=_('Issuer State'),
 Lines 767-772   class vacationResendDays(univention.admin.syntax.select): Link Here 
767
		editable=False,
813
		editable=False,
768
		options=['pki'],
814
		options=['pki'],
769
		identifies=False,
815
		identifies=False,
816
		copyable=True,
770
	),
817
	),
771
	'certificateIssuerLocation': univention.admin.property(
818
	'certificateIssuerLocation': univention.admin.property(
772
		short_description=_('Issuer Location'),
819
		short_description=_('Issuer Location'),
 Lines 778-783   class vacationResendDays(univention.admin.syntax.select): Link Here 
778
		editable=False,
825
		editable=False,
779
		options=['pki'],
826
		options=['pki'],
780
		identifies=False,
827
		identifies=False,
828
		copyable=True,
781
	),
829
	),
782
	'certificateIssuerOrganisation': univention.admin.property(
830
	'certificateIssuerOrganisation': univention.admin.property(
783
		short_description=_('Issuer Organisation'),
831
		short_description=_('Issuer Organisation'),
 Lines 789-794   class vacationResendDays(univention.admin.syntax.select): Link Here 
789
		editable=False,
837
		editable=False,
790
		options=['pki'],
838
		options=['pki'],
791
		identifies=False,
839
		identifies=False,
840
		copyable=True,
792
	),
841
	),
793
	'certificateIssuerOrganisationalUnit': univention.admin.property(
842
	'certificateIssuerOrganisationalUnit': univention.admin.property(
794
		short_description=_('Issuer Organisational Unit'),
843
		short_description=_('Issuer Organisational Unit'),
 Lines 800-805   class vacationResendDays(univention.admin.syntax.select): Link Here 
800
		editable=False,
849
		editable=False,
801
		options=['pki'],
850
		options=['pki'],
802
		identifies=False,
851
		identifies=False,
852
		copyable=True,
803
	),
853
	),
804
	'certificateIssuerCommonName': univention.admin.property(
854
	'certificateIssuerCommonName': univention.admin.property(
805
		short_description=_('Issuer Common Name'),
855
		short_description=_('Issuer Common Name'),
 Lines 811-816   class vacationResendDays(univention.admin.syntax.select): Link Here 
811
		editable=False,
861
		editable=False,
812
		options=['pki'],
862
		options=['pki'],
813
		identifies=False,
863
		identifies=False,
864
		copyable=True,
814
	),
865
	),
815
	'certificateIssuerMail': univention.admin.property(
866
	'certificateIssuerMail': univention.admin.property(
816
		short_description=_('Issuer Mail'),
867
		short_description=_('Issuer Mail'),
 Lines 822-827   class vacationResendDays(univention.admin.syntax.select): Link Here 
822
		editable=False,
873
		editable=False,
823
		options=['pki'],
874
		options=['pki'],
824
		identifies=False,
875
		identifies=False,
876
		copyable=True,
825
	),
877
	),
826
	'certificateSubjectCountry': univention.admin.property(
878
	'certificateSubjectCountry': univention.admin.property(
827
		short_description=_('Subject Country'),
879
		short_description=_('Subject Country'),
 Lines 833-838   class vacationResendDays(univention.admin.syntax.select): Link Here 
833
		editable=False,
885
		editable=False,
834
		options=['pki'],
886
		options=['pki'],
835
		identifies=False,
887
		identifies=False,
888
		copyable=True,
836
	),
889
	),
837
	'certificateSubjectState': univention.admin.property(
890
	'certificateSubjectState': univention.admin.property(
838
		short_description=_('Subject State'),
891
		short_description=_('Subject State'),
 Lines 844-849   class vacationResendDays(univention.admin.syntax.select): Link Here 
844
		editable=False,
897
		editable=False,
845
		options=['pki'],
898
		options=['pki'],
846
		identifies=False,
899
		identifies=False,
900
		copyable=True,
847
	),
901
	),
848
	'certificateSubjectLocation': univention.admin.property(
902
	'certificateSubjectLocation': univention.admin.property(
849
		short_description=_('Subject Location'),
903
		short_description=_('Subject Location'),
 Lines 855-860   class vacationResendDays(univention.admin.syntax.select): Link Here 
855
		editable=False,
909
		editable=False,
856
		options=['pki'],
910
		options=['pki'],
857
		identifies=False,
911
		identifies=False,
912
		copyable=True,
858
	),
913
	),
859
	'certificateSubjectOrganisation': univention.admin.property(
914
	'certificateSubjectOrganisation': univention.admin.property(
860
		short_description=_('Subject Organisation'),
915
		short_description=_('Subject Organisation'),
 Lines 866-871   class vacationResendDays(univention.admin.syntax.select): Link Here 
866
		editable=False,
921
		editable=False,
867
		options=['pki'],
922
		options=['pki'],
868
		identifies=False,
923
		identifies=False,
924
		copyable=True,
869
	),
925
	),
870
	'certificateSubjectOrganisationalUnit': univention.admin.property(
926
	'certificateSubjectOrganisationalUnit': univention.admin.property(
871
		short_description=_('Subject Organisational Unit'),
927
		short_description=_('Subject Organisational Unit'),
 Lines 877-882   class vacationResendDays(univention.admin.syntax.select): Link Here 
877
		editable=False,
933
		editable=False,
878
		options=['pki'],
934
		options=['pki'],
879
		identifies=False,
935
		identifies=False,
936
		copyable=True,
880
	),
937
	),
881
	'certificateSubjectCommonName': univention.admin.property(
938
	'certificateSubjectCommonName': univention.admin.property(
882
		short_description=_('Subject Common Name'),
939
		short_description=_('Subject Common Name'),
 Lines 888-893   class vacationResendDays(univention.admin.syntax.select): Link Here 
888
		editable=False,
945
		editable=False,
889
		options=['pki'],
946
		options=['pki'],
890
		identifies=False,
947
		identifies=False,
948
		copyable=True,
891
	),
949
	),
892
	'certificateSubjectMail': univention.admin.property(
950
	'certificateSubjectMail': univention.admin.property(
893
		short_description=_('Subject Mail'),
951
		short_description=_('Subject Mail'),
 Lines 899-904   class vacationResendDays(univention.admin.syntax.select): Link Here 
899
		editable=False,
957
		editable=False,
900
		options=['pki'],
958
		options=['pki'],
901
		identifies=False,
959
		identifies=False,
960
		copyable=True,
902
	),
961
	),
903
	'certificateDateNotBefore': univention.admin.property(
962
	'certificateDateNotBefore': univention.admin.property(
904
		short_description=_('Valid from'),
963
		short_description=_('Valid from'),
 Lines 910-915   class vacationResendDays(univention.admin.syntax.select): Link Here 
910
		editable=False,
969
		editable=False,
911
		options=['pki'],
970
		options=['pki'],
912
		identifies=False,
971
		identifies=False,
972
		copyable=True,
913
	),
973
	),
914
	'certificateDateNotAfter': univention.admin.property(
974
	'certificateDateNotAfter': univention.admin.property(
915
		short_description=_('Valid until'),
975
		short_description=_('Valid until'),
 Lines 921-926   class vacationResendDays(univention.admin.syntax.select): Link Here 
921
		editable=False,
981
		editable=False,
922
		options=['pki'],
982
		options=['pki'],
923
		identifies=False,
983
		identifies=False,
984
		copyable=True,
924
	),
985
	),
925
	'certificateVersion': univention.admin.property(
986
	'certificateVersion': univention.admin.property(
926
		short_description=_('Version'),
987
		short_description=_('Version'),
 Lines 932-937   class vacationResendDays(univention.admin.syntax.select): Link Here 
932
		editable=False,
993
		editable=False,
933
		options=['pki'],
994
		options=['pki'],
934
		identifies=False,
995
		identifies=False,
996
		copyable=True,
935
	),
997
	),
936
	'certificateSerial': univention.admin.property(
998
	'certificateSerial': univention.admin.property(
937
		short_description=_('Serial'),
999
		short_description=_('Serial'),
 Lines 943-948   class vacationResendDays(univention.admin.syntax.select): Link Here 
943
		editable=False,
1005
		editable=False,
944
		options=['pki'],
1006
		options=['pki'],
945
		identifies=False,
1007
		identifies=False,
1008
		copyable=True,
946
	),
1009
	),
947
	'umcProperty': univention.admin.property(
1010
	'umcProperty': univention.admin.property(
948
		short_description=_('UMC user preferences'),
1011
		short_description=_('UMC user preferences'),
 Lines 953-958   class vacationResendDays(univention.admin.syntax.select): Link Here 
953
		required=False,
1016
		required=False,
954
		may_change=True,
1017
		may_change=True,
955
		identifies=False,
1018
		identifies=False,
1019
		copyable=True,
956
	),
1020
	),
957
}
1021
}
958
1022
(-)a/management/univention-management-console-module-udm/umc/js/udm.js (-12 / +35 lines)
 Lines 277-289   define([ Link Here 
277
277
278
			// check whether we need to open directly the detail page of a given or a new object
278
			// check whether we need to open directly the detail page of a given or a new object
279
			if (this.openObject) {
279
			if (this.openObject) {
280
				this._loadUCRVariables().then(lang.hitch(this, 'createDetailPage',
280
				this._loadUCRVariables().then(lang.hitch(this, 'createDetailPage', 'edit',
281
					this.openObject.objectType, this.openObject.objectDN, undefined, true, this.openObject.note)
281
					this.openObject.objectType, this.openObject.objectDN, undefined, true, this.openObject.note)
282
				);
282
				);
283
				return; // do not render the search page
283
				return; // do not render the search page
284
			}
284
			}
285
			if (this.newObject) {
285
			if (this.newObject) {
286
				this._loadUCRVariables().then(lang.hitch(this, 'createDetailPage',
286
				this._loadUCRVariables().then(lang.hitch(this, 'createDetailPage', 'add',
287
					this.newObject.objectType, undefined, this.newObject, true, this.newObject.note)
287
					this.newObject.objectType, undefined, this.newObject, true, this.newObject.note)
288
				);
288
				);
289
				return; // do not render the search page
289
				return; // do not render the search page
 Lines 366-372   define([ Link Here 
366
					var objType = state.shift();
366
					var objType = state.shift();
367
					var ldapName = state.length > 1 ? state : state[0];
367
					var ldapName = state.length > 1 ? state : state[0];
368
					this._loadUCRVariables().then(lang.hitch(this, function() {
368
					this._loadUCRVariables().then(lang.hitch(this, function() {
369
						this.createDetailPage(objType, ldapName);
369
						this.createDetailPage('edit', objType, ldapName);
370
					}));
370
					}));
371
				}
371
				}
372
				this._set('moduleState', _state);
372
				this._set('moduleState', _state);
 Lines 684-690   define([ Link Here 
684
				canExecute: lang.hitch(this, '_canEdit'),
684
				canExecute: lang.hitch(this, '_canEdit'),
685
				callback: lang.hitch(this, function(ids, items) {
685
				callback: lang.hitch(this, function(ids, items) {
686
					if (items.length == 1 && items[0].objectType) {
686
					if (items.length == 1 && items[0].objectType) {
687
						this.createDetailPage(items[0].objectType, ids[0]);
687
						this.createDetailPage('edit', items[0].objectType, ids[0]);
688
					} else if (items.length >= 1 && items[0].objectType) {
688
					} else if (items.length >= 1 && items[0].objectType) {
689
						// make sure that all objects do have the same type
689
						// make sure that all objects do have the same type
690
						var sameType = true;
690
						var sameType = true;
 Lines 698-704   define([ Link Here 
698
						}
698
						}
699
699
700
						// everything ok, load detail page
700
						// everything ok, load detail page
701
						this.createDetailPage(items[0].objectType, ids);
701
						this.createDetailPage('edit', items[0].objectType, ids);
702
					}
702
					}
703
				})
703
				})
704
			}, {
704
			}, {
 Lines 742-747   define([ Link Here 
742
				callback: lang.hitch(this, function(ids, objects) {
742
				callback: lang.hitch(this, function(ids, objects) {
743
					this.moveObjects(objects);
743
					this.moveObjects(objects);
744
				})
744
				})
745
			}, {
746
				name: 'copy',
747
				label: _('Copy'),
748
				description: _('Create a copy of the LDAP object.'),
749
				isMultiAction: false,
750
				canExecute: lang.hitch(this, '_canCopy'),
751
				callback: lang.hitch(this, function(ids, items) {
752
					// FIXME: show a dialog which selects the container/position
753
					this.createDetailPage('copy', items[0].objectType, ids[0], {
754
						objectType: items[0].objectType,
755
						superordinates: null,
756
						container: ids[0].substring(tools.explodeDn(ids[0])[0].length + 1)
757
					});
758
				})
745
			}];
759
			}];
746
760
747
			if ('navigation' !== this.moduleFlavor && this._reports.length) {
761
			if ('navigation' !== this.moduleFlavor && this._reports.length) {
 Lines 1145-1151   define([ Link Here 
1145
				label: _('Edit'),
1159
				label: _('Edit'),
1146
				iconClass: 'umcIconEdit',
1160
				iconClass: 'umcIconEdit',
1147
				onClick: lang.hitch(this, function() {
1161
				onClick: lang.hitch(this, function() {
1148
					this.createDetailPage(this._navContextItem.objectType, this._navContextItem.id);
1162
					this.createDetailPage('edit', this._navContextItem.objectType, this._navContextItem.id);
1149
				})
1163
				})
1150
			}));
1164
			}));
1151
			menu.addChild(this._menuDelete = new MenuItem({
1165
			menu.addChild(this._menuDelete = new MenuItem({
 Lines 1207-1212   define([ Link Here 
1207
			return item.$operations$.indexOf('move') !== -1;
1221
			return item.$operations$.indexOf('move') !== -1;
1208
		},
1222
		},
1209
1223
1224
		_canCopy: function(item) {
1225
			return item.$operations$.indexOf('copy') !== -1;
1226
		},
1227
1210
		_canDelete: function(item) {
1228
		_canDelete: function(item) {
1211
			if (tools.isTrue(this._ucr['ad/member'])) {
1229
			if (tools.isTrue(this._ucr['ad/member'])) {
1212
				return -1 === array.indexOf(item.$flags$, 'synced');
1230
				return -1 === array.indexOf(item.$flags$, 'synced');
 Lines 1833-1839   define([ Link Here 
1833
				defaultObjectType: this._ucr['directory/manager/web/modules/' + this.moduleFlavor + '/add/default'] || null
1851
				defaultObjectType: this._ucr['directory/manager/web/modules/' + this.moduleFlavor + '/add/default'] || null
1834
			});
1852
			});
1835
			this._newObjectDialog.on('FirstPageFinished', lang.hitch(this, function(options) {
1853
			this._newObjectDialog.on('FirstPageFinished', lang.hitch(this, function(options) {
1836
				this.createDetailPage(options.objectType, undefined, options);
1854
				this.createDetailPage('add', options.objectType, undefined, options);
1837
			}));
1855
			}));
1838
			this._newObjectDialog.on('Done', lang.hitch(this, function() {
1856
			this._newObjectDialog.on('Done', lang.hitch(this, function() {
1839
				if (this._newObjectDialog) {
1857
				if (this._newObjectDialog) {
 Lines 1880-1885   define([ Link Here 
1880
			}
1898
			}
1881
1899
1882
			this._setDetailPage(
1900
			this._setDetailPage(
1901
				'edit',
1883
				this._preloadedObjectType,
1902
				this._preloadedObjectType,
1884
				this._ldapNameDeferred,
1903
				this._ldapNameDeferred,
1885
				/*newObjectOptions*/ null,
1904
				/*newObjectOptions*/ null,
 Lines 1888-1894   define([ Link Here 
1888
			);
1907
			);
1889
		},
1908
		},
1890
1909
1891
		_setDetailPage: function(objectType, ldapName, newObjOptions, /*Boolean*/ isClosable, /*String*/ note) {
1910
		_setDetailPage: function(operation, objectType, ldapName, newObjOptions, /*Boolean*/ isClosable, /*String*/ note) {
1892
			this._destroyDetailPage();
1911
			this._destroyDetailPage();
1893
			var cssClass = this.moduleFlavor == 'users/user' ? 'umcUDMUsersModule' : '';
1912
			var cssClass = this.moduleFlavor == 'users/user' ? 'umcUDMUsersModule' : '';
1894
			this._detailPage = new DetailPage({
1913
			this._detailPage = new DetailPage({
 Lines 1899-1904   define([ Link Here 
1899
				moduleStore: this.moduleStore,
1918
				moduleStore: this.moduleStore,
1900
				moduleFlavor: this.moduleFlavor,
1919
				moduleFlavor: this.moduleFlavor,
1901
				objectType: objectType,
1920
				objectType: objectType,
1921
				operation: operation,
1902
				ldapBase: this._ucr['ldap/base'],
1922
				ldapBase: this._ucr['ldap/base'],
1903
				ldapName: ldapName,
1923
				ldapName: ldapName,
1904
				newObjectOptions: newObjOptions,
1924
				newObjectOptions: newObjOptions,
 Lines 1913-1929   define([ Link Here 
1913
			}
1933
			}
1914
		},
1934
		},
1915
1935
1916
		createDetailPage: function(objectType, ldapName, newObjOptions, /*Boolean?*/ isClosable, /*String?*/ note) {
1936
		createDetailPage: function(operation, objectType, ldapName, newObjOptions, /*Boolean?*/ isClosable, /*String?*/ note) {
1917
			// summary:
1937
			// summary:
1918
			//		Creates and views the detail page for editing LDAP objects if it doesn't exists. Afterwards it opens the detailpage.
1938
			//		Creates and views the detail page for editing LDAP objects if it doesn't exists. Afterwards it opens the detailpage.
1919
			if (!this._ldapNameDeferred) {
1939
			if (!this._ldapNameDeferred) {
1920
				this._preloadDetailPage();
1940
				this._preloadDetailPage(operation);
1921
			}
1941
			}
1922
			if (this._detailPage && this._preloadedObjectType == this.moduleFlavor && ldapName && !(ldapName instanceof Array)) {
1942
			if (operation === 'copy') {
1943
				this._setDetailPage(operation, objectType, ldapName, newObjOptions, isClosable, note);
1944
				this._ldapNameDeferred.resolve(ldapName);
1945
			} else if (this._detailPage && this._preloadedObjectType == this.moduleFlavor && ldapName && !(ldapName instanceof Array)) {
1923
				// use pre-rendered detail page when loading a (single) object
1946
				// use pre-rendered detail page when loading a (single) object
1924
				this._ldapNameDeferred.resolve(ldapName);
1947
				this._ldapNameDeferred.resolve(ldapName);
1925
			} else {
1948
			} else {
1926
				this._setDetailPage(objectType, ldapName, newObjOptions, isClosable, note);
1949
				this._setDetailPage(operation, objectType, ldapName, newObjOptions, isClosable, note);
1927
				this._ldapNameDeferred.resolve(null);
1950
				this._ldapNameDeferred.resolve(null);
1928
			}
1951
			}
1929
1952
(-)a/management/univention-management-console-module-udm/umc/js/udm/DetailPage.js (-23 / +52 lines)
 Lines 26-32    Link Here 
26
 * /usr/share/common-licenses/AGPL-3; if not, see
26
 * /usr/share/common-licenses/AGPL-3; if not, see
27
 * <http://www.gnu.org/licenses/>.
27
 * <http://www.gnu.org/licenses/>.
28
 */
28
 */
29
/*global require,define,setTimeout,dijit,window,console*/
29
/*global require,define,setTimeout,window,console*/
30
30
31
define([
31
define([
32
	"dojo/_base/declare",
32
	"dojo/_base/declare",
 Lines 101-106   define([ Link Here 
101
		//		Flavor of the module
101
		//		Flavor of the module
102
		moduleFlavor: this.moduleFlavor,
102
		moduleFlavor: this.moduleFlavor,
103
103
104
		// operation: String
105
		// 		One of 'add', 'edit', 'copy'
106
		operation: null,
107
104
		// objectType: String
108
		// objectType: String
105
		//		The object type of the LDAP object that is edited.
109
		//		The object type of the LDAP object that is edited.
106
		objectType: null,
110
		objectType: null,
 Lines 268-274   define([ Link Here 
268
			domClass.toggle(this._headerButtons.help.domNode, 'dijitDisplayNone', !helpLink);
272
			domClass.toggle(this._headerButtons.help.domNode, 'dijitDisplayNone', !helpLink);
269
		},
273
		},
270
274
271
		_loadObject: function(formBuiltDeferred, policyDeferred) {
275
		_loadObject: function(formBuiltDeferred, policyDeferred, properties) {
272
			if (!this.ldapName || this._multiEdit) {
276
			if (!this.ldapName || this._multiEdit) {
273
				// no DN given or multi edit mode
277
				// no DN given or multi edit mode
274
				return all({
278
				return all({
 Lines 278-288   define([ Link Here 
278
			}
282
			}
279
283
280
			return all({
284
			return all({
281
				object: this.moduleStore.get(this.ldapName),
285
				object: this.getObject(this.ldapName),
282
				formBuilt: formBuiltDeferred
286
				formBuilt: formBuiltDeferred
283
			}).then(lang.hitch(this, function(result) {
287
			}).then(lang.hitch(this, function(result) {
284
				// save the original data we received from the server
288
				// save the original data we received from the server
285
				var vals = result.object;
289
				var vals = result.object;
290
//				if (this.operation === 'copy') {
291
//					vals = this.modifyValuesForCopy(vals, properties);
292
//				}
286
				this._receivedObjOrigData = vals;
293
				this._receivedObjOrigData = vals;
287
				this._form.setFormValues(vals);
294
				this._form.setFormValues(vals);
288
				this._getInitialFormValues();
295
				this._getInitialFormValues();
 Lines 304-323   define([ Link Here 
304
					}, this);
311
					}, this);
305
				}));
312
				}));
306
313
307
				// var objecttype = vals.$labelObjectType$;
314
				if (this.operation === 'add') {  // don't show when copying objects
308
				var path = tools.ldapDn2Path( this.ldapName, this.ldapBase);
315
					// var objecttype = vals.$labelObjectType$;
309
				var objecttype = _('Type: <i>%(type)s</i>', { type: vals.$labelObjectType$ });
316
					var path = tools.ldapDn2Path( this.ldapName, this.ldapBase);
310
				var position = _('Position: <i>%(path)s</i>', { path: path });
317
					var objecttype = _('Type: <i>%(type)s</i>', { type: vals.$labelObjectType$ });
311
				var position_text = lang.replace('{0}<br>{1}', [objecttype, position]);
318
					var position = _('Position: <i>%(path)s</i>', { path: path });
312
				array.forEach(this._tabs.getChildren(), lang.hitch(this, function(child) {
319
					var position_text = lang.replace('{0}<br>{1}', [objecttype, position]);
313
					if (child.position_text) {
320
					array.forEach(this._tabs.getChildren(), lang.hitch(this, function(child) {
314
						child.position_text.set('content', position_text);
321
						if (child.position_text) {
315
					}
322
							child.position_text.set('content', position_text);
316
				}));
323
						}
324
					}));
325
				}
317
				return this._form.ready();
326
				return this._form.ready();
318
			}));
327
			}));
319
		},
328
		},
320
329
330
		getObject: function(dn) {
331
			if (this.operation === 'copy') {
332
				return this.umcpCommand('udm/copy', [dn], undefined, this.moduleFlavor).then(function(response) {
333
					return response.result[0];
334
				});
335
			}
336
			return this.moduleStore.get(dn);
337
		},
338
339
//		modifyValuesForCopy: function(values, properties) {
340
//			values = lang.clone(values);
341
//			delete values.$dn$;
342
//			array.forEach(properties, function(property) {
343
//				if (property.identifies) {
344
//					delete values[property.id];
345
//				}
346
//			}, this);
347
//			return values;
348
//		},
349
321
		ready: function() {
350
		ready: function() {
322
			return this._pageRenderedDeferred;
351
			return this._pageRenderedDeferred;
323
		},
352
		},
 Lines 364-370   define([ Link Here 
364
		},
393
		},
365
394
366
		_notifyAboutAutomaticChanges: function() {
395
		_notifyAboutAutomaticChanges: function() {
367
			if (!this.ldapName || this._multiEdit) {
396
			if (this.operation === 'add' || this.operation === 'copy' || this._multiEdit) {
368
				// ignore creation of a new object as well as the multi edit mode
397
				// ignore creation of a new object as well as the multi edit mode
369
				return;
398
				return;
370
			}
399
			}
 Lines 658-664   define([ Link Here 
658
					iprop.disabled = true;
687
					iprop.disabled = true;
659
				} else {
688
				} else {
660
					if (iprop.disabled !== true) {
689
					if (iprop.disabled !== true) {
661
						iprop.disabled = this.ldapName === undefined ? false : ! iprop.editable;
690
						iprop.disabled = this.operation === 'add' ? false : ! iprop.editable;
662
					}
691
					}
663
				}
692
				}
664
				if (this._multiEdit && iprop.identifies) {
693
				if (this._multiEdit && iprop.identifies) {
 Lines 821-827   define([ Link Here 
821
				return text;
850
				return text;
822
			});
851
			});
823
852
824
			if (!this.active_directory_enabled() || !this.ldapName || !this.isSyncedObject) {
853
			if (!this.active_directory_enabled() || this.operation === 'add' || !this.isSyncedObject) {
825
				return;
854
				return;
826
			}
855
			}
827
			var value = '';
856
			var value = '';
 Lines 852-858   define([ Link Here 
852
		},
881
		},
853
882
854
		_prepareOptions: function(properties, layout, template, formBuiltDeferred) {
883
		_prepareOptions: function(properties, layout, template, formBuiltDeferred) {
855
			var isNewObject = !this.ldapName;
884
			var isNewObject = this.operation === 'add';
856
885
857
			var _getOptionProperty = function(properties) {
886
			var _getOptionProperty = function(properties) {
858
				var result = array.filter(properties, function(item) {
887
				var result = array.filter(properties, function(item) {
 Lines 1094-1100   define([ Link Here 
1094
			this._policyDeferred = new Deferred();
1123
			this._policyDeferred = new Deferred();
1095
			var loadedDeferred = when(this.ldapName, lang.hitch(this, function(ldapName) {
1124
			var loadedDeferred = when(this.ldapName, lang.hitch(this, function(ldapName) {
1096
				this.ldapName = ldapName;
1125
				this.ldapName = ldapName;
1097
				return this._loadObject(formBuiltDeferred, this._policyDeferred);
1126
				return this._loadObject(formBuiltDeferred, this._policyDeferred, properties);
1098
			}));
1127
			}));
1099
			loadedDeferred.then(lang.hitch(this, 'addActiveDirectoryWarning'));
1128
			loadedDeferred.then(lang.hitch(this, 'addActiveDirectoryWarning'));
1100
			loadedDeferred.then(lang.hitch(this, 'set', 'helpLink', metaInfo.help_link));
1129
			loadedDeferred.then(lang.hitch(this, 'set', 'helpLink', metaInfo.help_link));
 Lines 1142-1148   define([ Link Here 
1142
		},
1171
		},
1143
1172
1144
		buildTemplate: function(_template, properties, widgets) {
1173
		buildTemplate: function(_template, properties, widgets) {
1145
			if (this.ldapName || this._multiEdit) {
1174
			if (this.operation !== 'add' || this._multiEdit) {
1146
				return;
1175
				return;
1147
			}
1176
			}
1148
1177
 Lines 1214-1220   define([ Link Here 
1214
			});
1243
			});
1215
1244
1216
			var createLabel = '';
1245
			var createLabel = '';
1217
			if (this.newObjectOptions) {
1246
			if (this.operation === 'add' || this.operation === 'copy') {
1218
				createLabel = _createLabelText();
1247
				createLabel = _createLabelText();
1219
			} else {
1248
			} else {
1220
				createLabel = _('Save');
1249
				createLabel = _('Save');
 Lines 1731-1737   define([ Link Here 
1731
							this.moduleStore.put(ivals);
1760
							this.moduleStore.put(ivals);
1732
						}, this);
1761
						}, this);
1733
						deferred = transaction.commit();
1762
						deferred = transaction.commit();
1734
					} else if (this.newObjectOptions) {
1763
					} else if (this.operation === 'add' || this.operation === 'copy') {
1735
						deferred = this.moduleStore.add(vals, this.newObjectOptions);
1764
						deferred = this.moduleStore.add(vals, this.newObjectOptions);
1736
					} else {
1765
					} else {
1737
						deferred = this.moduleStore.put(vals);
1766
						deferred = this.moduleStore.put(vals);
 Lines 1885-1891   define([ Link Here 
1885
						newVals[iname] = iwidget.get('value');
1914
						newVals[iname] = iwidget.get('value');
1886
					}
1915
					}
1887
				}));
1916
				}));
1888
			} else if (this.newObjectOptions) {
1917
			} else if (this.operation === 'add' || this.operation === 'copy') {
1889
				// get only non-empty values or values of type 'boolean'
1918
				// get only non-empty values or values of type 'boolean'
1890
				tools.forIn(vals, lang.hitch(this, function(iname, ival) {
1919
				tools.forIn(vals, lang.hitch(this, function(iname, ival) {
1891
					if (typeof(ival) == 'boolean' || (!(ival instanceof Array && !ival.length) && ival)) {
1920
					if (typeof(ival) == 'boolean' || (!(ival instanceof Array && !ival.length) && ival)) {
 Lines 1919-1925   define([ Link Here 
1919
		confirmClose: function() {
1948
		confirmClose: function() {
1920
			topic.publish('/umc/actions', 'udm', this._parentModule.moduleFlavor, 'edit', 'cancel');
1949
			topic.publish('/umc/actions', 'udm', this._parentModule.moduleFlavor, 'edit', 'cancel');
1921
1950
1922
			if (!this.newObjectOptions && this.haveVisibleValuesChanged()) {
1951
			if (this.operation === 'edit' && this.haveVisibleValuesChanged()) {
1923
				return dialog.confirm(_('There are unsaved changes. Are you sure to cancel?'), [{
1952
				return dialog.confirm(_('There are unsaved changes. Are you sure to cancel?'), [{
1924
					label: _('Continue editing'),
1953
					label: _('Continue editing'),
1925
					name: 'cancel'
1954
					name: 'cancel'
(-)a/management/univention-management-console-module-udm/umc/python/udm/__init__.py (-38 / +47 lines)
 Lines 454-500   def get(self, request): Link Here 
454
		return: [ { '$dn$' : <LDAP DN>, <object properties> }, ... ]
454
		return: [ { '$dn$' : <LDAP DN>, <object properties> }, ... ]
455
		"""
455
		"""
456
456
457
		def _thread(request):
458
			result = []
459
			for ldap_dn in request.options:
460
				if request.flavor == 'users/self':
461
					ldap_dn = self._user_dn
462
				module = get_module(request.flavor, ldap_dn)
463
				if module is None:
464
					raise ObjectDoesNotExist(ldap_dn)
465
				else:
466
					obj = module.get(ldap_dn)
467
					if obj:
468
						obj.set_defaults = True
469
						for name, p in obj.descriptions.items():
470
							if obj.has_key(name) and obj.descriptions[name].default(obj):  # noqa: W601
471
								obj[name]  # __getitem__ sets default value
472
						props = obj.info
473
						for passwd in module.password_properties:
474
							if passwd in props:
475
								del props[passwd]
476
						props['$dn$'] = obj.dn
477
						props['$options$'] = {}
478
						for opt in module.get_options(udm_object=obj):
479
							props['$options$'][opt['id']] = opt['value']
480
						props['$policies$'] = {}
481
						for policy in obj.policies:
482
							pol_mod = get_module(None, policy)
483
							if pol_mod and pol_mod.name:
484
								props['$policies$'].setdefault(pol_mod.name, []).append(policy)
485
						props['$labelObjectType$'] = module.title
486
						props['$flags$'] = obj.oldattr.get('univentionObjectFlag', [])
487
						props['$operations$'] = module.operations
488
						props['$references$'] = module.get_references(ldap_dn)
489
						result.append(props)
490
					else:
491
						MODULE.process('The LDAP object for the LDAP DN %s could not be found' % ldap_dn)
492
			return result
493
494
		MODULE.info('Starting thread for udm/get request')
457
		MODULE.info('Starting thread for udm/get request')
495
		thread = notifier.threads.Simple('Get', notifier.Callback(_thread, request), notifier.Callback(self.thread_finished_callback, request))
458
		thread = notifier.threads.Simple('Get', notifier.Callback(self._get, request), notifier.Callback(self.thread_finished_callback, request))
496
		thread.run()
459
		thread.run()
497
460
461
	def copy(self, request):
462
		thread = notifier.threads.Simple('Copy', notifier.Callback(self._get, request, True), notifier.Callback(self.thread_finished_callback, request))
463
		thread.run()
464
465
	def _get(self, request, copy=False):
466
		result = []
467
		for ldap_dn in request.options:
468
			if request.flavor == 'users/self':
469
				ldap_dn = self._user_dn
470
			module = get_module(request.flavor, ldap_dn)
471
			if module is None:
472
				raise ObjectDoesNotExist(ldap_dn)
473
			else:
474
				obj = module.get(ldap_dn)
475
				if obj:
476
					if copy:
477
						for name, p in obj.descriptions.items():
478
							if not p.copyable:
479
								obj.info.pop(name, None)
480
					obj.set_defaults = True
481
					for name, p in obj.descriptions.items():
482
						if obj.has_key(name) and obj.descriptions[name].default(obj):  # noqa: W601
483
							obj[name]  # __getitem__ sets default value
484
					props = obj.info
485
					for passwd in module.password_properties:
486
						if passwd in props:
487
							del props[passwd]
488
					if not copy:
489
						props['$dn$'] = obj.dn
490
					props['$options$'] = {}
491
					for opt in module.get_options(udm_object=obj):
492
						props['$options$'][opt['id']] = opt['value']
493
					props['$policies$'] = {}
494
					for policy in obj.policies:
495
						pol_mod = get_module(None, policy)
496
						if pol_mod and pol_mod.name:
497
							props['$policies$'].setdefault(pol_mod.name, []).append(policy)
498
					props['$labelObjectType$'] = module.title
499
					props['$flags$'] = obj.oldattr.get('univentionObjectFlag', [])
500
					props['$operations$'] = module.operations
501
					props['$references$'] = module.get_references(ldap_dn)
502
					result.append(props)
503
				else:
504
					MODULE.process('The LDAP object for the LDAP DN %s could not be found' % ldap_dn)
505
		return result
506
498
	@sanitize(
507
	@sanitize(
499
		objectPropertyValue=LDAPSearchSanitizer(
508
		objectPropertyValue=LDAPSearchSanitizer(
500
			add_asterisks=ADD_ASTERISKS,
509
			add_asterisks=ADD_ASTERISKS,
(-)a/management/univention-management-console-module-udm/umc/udm.xml (+1 lines)
 Lines 116-121    Link Here 
116
		<command name="udm/add" function="add" />
116
		<command name="udm/add" function="add" />
117
		<command name="udm/remove" function="remove" />
117
		<command name="udm/remove" function="remove" />
118
		<command name="udm/get" function="get" />
118
		<command name="udm/get" function="get" />
119
		<command name="udm/copy" function="copy" />
119
		<command name="udm/move" function="move" />
120
		<command name="udm/move" function="move" />
120
		<command name="udm/progress" function="progress" />
121
		<command name="udm/progress" function="progress" />
121
		<command name="udm/validate" function="validate" />
122
		<command name="udm/validate" function="validate" />

Return to bug 1567