##// END OF EJS Templates
permissions: add better helper block about default permissions, and corelation with anonymous access.
bart -
r4222:21ec1451 stable
parent child Browse files
Show More
@@ -1,614 +1,614 b''
1 1 //
2 2 // Typography
3 3 // modified from Bootstrap
4 4 // --------------------------------------------------
5 5
6 6 // Base
7 7 body {
8 8 font-size: @basefontsize;
9 9 font-family: @text-light;
10 10 letter-spacing: .02em;
11 11 color: @grey2;
12 12 }
13 13
14 14 #content, label{
15 15 font-size: @basefontsize;
16 16 }
17 17
18 18 label {
19 19 color: @grey2;
20 20 }
21 21
22 22 ::selection { background: @rchighlightblue; }
23 23
24 24 // Headings
25 25 // -------------------------
26 26
27 27 h1, h2, h3, h4, h5, h6,
28 28 .h1, .h2, .h3, .h4, .h5, .h6 {
29 29 margin: 0 0 @textmargin 0;
30 30 padding: 0;
31 31 line-height: 1.8em;
32 32 color: @text-color;
33 33 a {
34 34 color: @rcblue;
35 35 }
36 36 }
37 37
38 38 h1, .h1 { font-size: 1.54em; font-weight: @text-bold-weight; font-family: @text-bold; }
39 39 h2, .h2 { font-size: 1.23em; font-weight: @text-semibold-weight; font-family: @text-semibold; }
40 40 h3, .h3 { font-size: 1.23em; font-family: @text-regular; }
41 41 h4, .h4 { font-size: 1em; font-weight: @text-bold-weight; font-family: @text-bold; }
42 42 h5, .h5 { font-size: 1em; font-weight: @text-bold-weight; font-family: @text-bold; }
43 43 h6, .h6 { font-size: 1em; font-weight: @text-bold-weight; font-family: @text-bold; }
44 44
45 45 // Breadcrumbs
46 46 .breadcrumbs {
47 47 font-size: @repo-title-fontsize;
48 48 margin: 0;
49 49 width: ~"calc(100% - 180px)";
50 50 float: left;
51 51
52 52 h4 {
53 53 font-size: @basefontsize;
54 54 margin-bottom: 15px;
55 55 }
56 56 }
57 57
58 58 .breadcrumbs_light {
59 59 float:left;
60 60 font-size: 1.3em;
61 61 line-height: 38px;
62 62 }
63 63
64 64 // Body text
65 65 // -------------------------
66 66
67 67 p {
68 68 margin: 0 0 @textmargin 0;
69 69 padding: 0;
70 70 line-height: 2em;
71 71 }
72 72
73 73 .lead {
74 74 margin-bottom: @textmargin;
75 75 font-weight: 300;
76 76 line-height: 1.4;
77 77
78 78 @media (min-width: @screen-sm-min) {
79 79 font-size: (@basefontsize * 1.5);
80 80 }
81 81 }
82 82
83 83 a,
84 84 .link {
85 85 color: @rcblue;
86 86 text-decoration: none;
87 87 outline: none;
88 88 cursor: pointer;
89 89
90 90 &:focus {
91 91 outline: none;
92 92 }
93 93
94 94 &:hover {
95 95 color: @rcdarkblue;
96 96 }
97 97 }
98 98
99 99 img {
100 100 border: none;
101 101 outline: none;
102 102 }
103 103
104 104 strong {
105 105 font-weight: @text-bold-weight;
106 106 font-family: @text-bold;
107 107 }
108 108
109 109 em {
110 110 font-family: @text-italic;
111 111 font-style: italic;
112 112 }
113 113
114 114 strong em,
115 115 em strong {
116 116 font-style: italic;
117 117 font-weight: @text-bold-italic-weight;
118 118 font-family: @text-bold-italic;
119 119 }
120 120
121 121 //TODO: lisa: b and i are depreciated, but we are still using them in places.
122 122 // Should probably make some decision whether to keep or lose these.
123 123 b {
124 124
125 125 }
126 126
127 127 i {
128 128 font-style: normal;
129 129 }
130 130
131 131 label {
132 132 color: @text-color;
133 133
134 134 input[type="checkbox"] {
135 135 margin-right: 1em;
136 136 }
137 137 input[type="radio"] {
138 138 margin-right: 1em;
139 139 }
140 140 }
141 141
142 142 code,
143 143 .code {
144 144 font-size: .95em;
145 145 font-family: @text-code;
146 146 color: @grey3;
147 147
148 148 a {
149 149 color: lighten(@rcblue,10%)
150 150 }
151 151 }
152 152
153 153 pre {
154 154 margin: 0;
155 155 padding: 0;
156 156 border: 0;
157 157 outline: 0;
158 158 font-size: @basefontsize*.95;
159 159 line-height: 1.4em;
160 160 font-family: @text-code;
161 161 color: @grey3;
162 162 }
163 163
164 164 // Emphasis & misc
165 165 // -------------------------
166 166 .discreet {
167 167 color: @grey4;
168 168 font-size: 85%;
169 169 font-weight: normal;
170 170
171 171 a {
172 172 color: @grey4;
173 173
174 174 &:hover {
175 175 color: @rcdarkblue;
176 176 }
177 177 }
178 178 }
179 179
180 180 small,
181 181 .small {
182 182 font-size: 75%;
183 183 font-weight: normal;
184 184 line-height: 1em;
185 185 }
186 186
187 187 mark,
188 188 .mark {
189 189 padding: .2em;
190 190 }
191 191
192 192 // Alignment
193 193 .text-left { text-align: left; }
194 194 .text-right { text-align: right; }
195 195 .text-center { text-align: center; }
196 196 .text-justify { text-align: justify; }
197 197 .text-nowrap { white-space: nowrap; }
198 198
199 199 // Transformation
200 200 .text-lowercase { text-transform: lowercase; }
201 201 .text-uppercase { text-transform: uppercase; }
202 202 .text-capitalize { text-transform: capitalize; }
203 203
204 204 // Contextual colors
205 205 .text-muted {
206 206 color: @grey4;
207 207 }
208 208 .text-primary {
209 209 color: @rcblue;
210 210 }
211 211 .text-success {
212 212 color: @alert1;
213 213 }
214 214 .text-info {
215 215 color: @alert4;
216 216 }
217 217 .text-warning {
218 218 color: @alert3;
219 219 }
220 220 .text-danger {
221 221 color: @alert2;
222 222 }
223 223
224 224 // Contextual backgrounds
225 225 .bg-primary {
226 226 background-color: white;
227 227 }
228 228 .bg-success {
229 229 background-color: @alert1;
230 230 }
231 231 .bg-info {
232 232 background-color: @alert4;
233 233 }
234 234 .bg-warning {
235 235 background-color: @alert3;
236 236 }
237 237 .bg-danger {
238 238 background-color: @alert2;
239 239 }
240 240
241 241
242 242 // Page header
243 243 // -------------------------
244 244
245 245 .page-header {
246 246 margin: @pagepadding 0 @textmargin;
247 247 border-bottom: @border-thickness solid @grey5;
248 248 }
249 249
250 250 .title {
251 251 clear: both;
252 252 float: left;
253 253 width: 100%;
254 254 margin: @pagepadding/2 0 @pagepadding/4;
255 255 min-height: 25px;
256 256
257 257 .breadcrumbs {
258 258 float: left;
259 259 clear: both;
260 260 width: 700px;
261 261 margin: 0;
262 262
263 263 .q_filter_box {
264 264 margin-right: @padding;
265 265 }
266 266 }
267 267
268 268 h1 a {
269 269 color: @rcblue;
270 270 }
271 271
272 272 input{
273 273 margin-right: @padding;
274 274 }
275 275
276 276 h5, .h5 {
277 277 color: @grey1;
278 278 margin-bottom: @space;
279 279
280 280 span {
281 281 display: inline-block;
282 282 }
283 283 }
284 284
285 285 p {
286 286 margin-bottom: 0;
287 287 }
288 288
289 289 .links {
290 290 float: right;
291 291 display: inline;
292 292 margin: 0;
293 293 padding-left: 0;
294 294 list-style: none;
295 295 text-align: right;
296 296
297 297 li {
298 298 float: right;
299 299 list-style-type: none;
300 300 }
301 301
302 302 a {
303 303 display: inline-block;
304 304 margin-left: @textmargin/2;
305 305 }
306 306 }
307 307
308 308 .title-content {
309 309
310 310 &.repo-title {
311 311 float: none
312 312 }
313 313
314 314 float: left;
315 315 margin: 0;
316 316 padding: 0;
317 317
318 318 & + .breadcrumbs {
319 319 margin-top: @padding;
320 320 }
321 321
322 322 & + .links {
323 323 margin-top: -@button-padding;
324 324
325 325 & + .breadcrumbs {
326 326 margin-top: @padding;
327 327 }
328 328 }
329 329
330 330 .repo-group-desc {
331 331 padding: 8px 0px 0px 0px;
332 332 }
333 333 }
334 334
335 335 .title-main {
336 336 font-size: @repo-title-fontsize;
337 337 }
338 338
339 339 .title-description {
340 340 margin-top: .5em;
341 341 }
342 342
343 343 .q_filter_box {
344 344 width: 200px;
345 345 }
346 346
347 347 }
348 348
349 349 #readme .title {
350 350 text-transform: none;
351 351 }
352 352
353 353 // Lists
354 354 // -------------------------
355 355
356 356 // Unordered and Ordered lists
357 357 ul,
358 358 ol {
359 359 margin-top: 0;
360 360 margin-bottom: @textmargin;
361 361 ul,
362 362 ol {
363 363 margin-bottom: 0;
364 364 }
365 365 }
366 366
367 367 li {
368 368 line-height: 2em;
369 369 }
370 370
371 371 ul li {
372 372 position: relative;
373 373 list-style-type: disc;
374 374
375 375 p:first-child {
376 376 display:inline;
377 377 }
378 378 }
379 379
380 380 // List options
381 381
382 382 // Unstyled keeps list items block level, just removes default browser padding and list-style
383 383 .list-unstyled {
384 384 padding-left: 0;
385 385 list-style: none;
386 386 li:before { content: none; }
387 387 }
388 388
389 389 // Inline turns list items into inline-block
390 390 .list-inline {
391 391 .list-unstyled();
392 392 margin-left: -5px;
393 393
394 394 > li {
395 395 display: inline-block;
396 396 padding-left: 5px;
397 397 padding-right: 5px;
398 398 }
399 399 }
400 400
401 401 // Description Lists
402 402
403 403 dl {
404 404 margin-top: 0; // Remove browser default
405 405 margin-bottom: @textmargin;
406 406 }
407 407
408 408 dt,
409 409 dd {
410 410 line-height: 1.4em;
411 411 }
412 412
413 413 dt {
414 414 margin: @textmargin 0 0 0;
415 415 font-weight: @text-bold-weight;
416 416 font-family: @text-bold;
417 417 }
418 418
419 419 dd {
420 420 margin-left: 0; // Undo browser default
421 421 }
422 422
423 423 // Horizontal description lists
424 424 // Defaults to being stacked without any of the below styles applied, until the
425 425 // grid breakpoint is reached (default of ~768px).
426 426 // These are used in forms as well; see style guide.
427 427 // TODO: lisa: These should really not be used in forms.
428 428
429 429 .dl-horizontal {
430 430
431 431 overflow: hidden;
432 432 margin-bottom: @space;
433 433
434 434 dt, dd {
435 435 float: left;
436 436 margin: 5px 0 5px 0;
437 437 }
438 438
439 439 dt {
440 440 clear: left;
441 441 width: @label-width - @form-vertical-margin;
442 442 }
443 443
444 444 dd {
445 445 &:extend(.clearfix all); // Clear the floated `dt` if an empty `dd` is present
446 446 margin-left: @form-vertical-margin;
447 447 max-width: @form-max-width - (@label-width - @form-vertical-margin) - @form-vertical-margin;
448 448 }
449 449
450 450 pre {
451 451 margin: 0;
452 452 }
453 453
454 454 &.settings {
455 455 dt {
456 456 text-align: left;
457 457 }
458 458 }
459 459
460 460 @media (min-width: 768px) {
461 461 dt {
462 462 float: left;
463 463 width: 185px;
464 464 clear: left;
465 465 text-align: right;
466 466 }
467 467 dd {
468 468 margin-left: 20px;
469 469 }
470 470 }
471 471
472 472 &.dt-300 {
473 473 dt {
474 474 width: 300px;
475 475 }
476 476 }
477 477
478 478 &.dt-400 {
479 479 dt {
480 480 width: 400px;
481 481 }
482 482 }
483 483
484 484 &.dt-500 {
485 485 dt {
486 486 width: 500px;
487 487 }
488 488 }
489 489
490 490 &.dt-600 {
491 491 dt {
492 492 width: 600px;
493 493 }
494 494 }
495 495
496 496 &.dt-700 {
497 497 dt {
498 498 width: 700px;
499 499 }
500 500 }
501 501
502 502 &.dt-800 {
503 503 dt {
504 504 width: 800px;
505 505 }
506 506 }
507 507 }
508 508
509 509
510 510 // Misc
511 511 // -------------------------
512 512
513 513 // Abbreviations and acronyms
514 514 abbr[title],
515 515 abbr[data-original-title] {
516 516 cursor: help;
517 517 border-bottom: @border-thickness dotted @grey4;
518 518 }
519 519 .initialism {
520 520 font-size: 90%;
521 521 text-transform: uppercase;
522 522 }
523 523
524 524 // Blockquotes
525 525 blockquote {
526 526 padding: 1em 2em;
527 527 margin: 0 0 2em;
528 528 font-size: @basefontsize;
529 529 border-left: 2px solid @grey6;
530 530
531 531 p,
532 532 ul,
533 533 ol {
534 534 &:last-child {
535 535 margin-bottom: 0;
536 536 }
537 537 }
538 538
539 539 footer,
540 540 small,
541 541 .small {
542 542 display: block;
543 543 font-size: 80%;
544 544
545 545 &:before {
546 546 content: '\2014 \00A0'; // em dash, nbsp
547 547 }
548 548 }
549 549 }
550 550
551 551 // Opposite alignment of blockquote
552 552 //
553 553 .blockquote-reverse,
554 554 blockquote.pull-right {
555 555 padding-right: 15px;
556 556 padding-left: 0;
557 557 border-right: 5px solid @grey6;
558 558 border-left: 0;
559 559 text-align: right;
560 560
561 561 // Account for citation
562 562 footer,
563 563 small,
564 564 .small {
565 565 &:before { content: ''; }
566 566 &:after {
567 567 content: '\00A0 \2014'; // nbsp, em dash
568 568 }
569 569 }
570 570 }
571 571
572 572 // Addresses
573 573 address {
574 574 margin-bottom: 2em;
575 575 font-style: normal;
576 576 line-height: 1.8em;
577 577 }
578 578
579 579 .error-message {
580 580 display: block;
581 581 margin: @padding/3 0;
582 582 color: @alert2;
583 583 }
584 584
585 585 .issue-tracker-link {
586 586 color: @rcblue;
587 587 }
588 588
589 589 .info_text{
590 590 font-size: @basefontsize;
591 591 color: @grey4;
592 592 font-family: @text-regular;
593 593 }
594 594
595 595 .help-block-inline {
596 margin: 0;
596 margin: 0 !important;
597 597 }
598 598
599 599 // help block text
600 600 .help-block {
601 601 display: block;
602 602 margin: 0 0 @padding;
603 603 color: @grey4;
604 604 font-family: @text-light;
605 605 &.pre-formatting {
606 606 white-space: pre-wrap;
607 607 }
608 608 }
609 609
610 610 .error-message {
611 611 display: block;
612 612 margin: @padding/3 0;
613 613 color: @alert2;
614 614 }
@@ -1,44 +1,44 b''
1 1 ## -*- coding: utf-8 -*-
2 2 <%inherit file="/base/base.mako"/>
3 3
4 4 <%def name="title()">
5 5 ${_('%s repository group settings') % c.repo_group.name}
6 6 %if c.rhodecode_name:
7 7 &middot; ${h.branding(c.rhodecode_name)}
8 8 %endif
9 9 </%def>
10 10
11 11 <%def name="menu_bar_nav()">
12 12 ${self.menu_items(active='admin')}
13 13 </%def>
14 14
15 15 <%def name="menu_bar_subnav()">
16 16 ${self.repo_group_menu(active='settings')}
17 17 </%def>
18 18
19 19 <%def name="main_content()">
20 20 <%include file="/admin/repo_groups/repo_group_edit_${c.active}.mako"/>
21 21 </%def>
22 22
23 23 <%def name="main()">
24 24
25 25 <div class="box">
26 26 <div class="sidebar-col-wrapper">
27 27 ##main
28 28 <div class="sidebar">
29 29 <ul class="nav nav-pills nav-stacked">
30 30 <li class="${h.is_active('settings', c.active)}"><a href="${h.route_path('edit_repo_group', repo_group_name=c.repo_group.group_name)}">${_('Settings')}</a></li>
31 <li class="${h.is_active('permissions', c.active)}"><a href="${h.route_path('edit_repo_group_perms', repo_group_name=c.repo_group.group_name)}">${_('Permissions')}</a></li>
31 <li class="${h.is_active('permissions', c.active)}"><a href="${h.route_path('edit_repo_group_perms', repo_group_name=c.repo_group.group_name)}">${_('Access Permissions')}</a></li>
32 32 <li class="${h.is_active('advanced', c.active)}"><a href="${h.route_path('edit_repo_group_advanced', repo_group_name=c.repo_group.group_name)}">${_('Advanced')}</a></li>
33 33 <li class="${h.is_active('integrations', c.active)}"><a href="${h.route_path('repo_group_integrations_home', repo_group_name=c.repo_group.group_name)}">${_('Integrations')}</a></li>
34 34 </ul>
35 35 </div>
36 36
37 37 <div class="main-content-full-width">
38 38 ${self.main_content()}
39 39 </div>
40 40
41 41 </div>
42 42 </div>
43 43
44 44 </%def>
@@ -1,220 +1,230 b''
1 1 <%namespace name="base" file="/base/base.mako"/>
2 2
3 3 <div class="panel panel-default">
4 4 <div class="panel-heading">
5 5 <h3 class="panel-title">${_('Repository Group Permissions: {}').format(c.repo_group.name)}</h3>
6 6 </div>
7 7 <div class="panel-body">
8 8 ${h.secure_form(h.route_path('edit_repo_group_perms_update', repo_group_name=c.repo_group.group_name), request=request)}
9 9 <table id="permissions_manage" class="rctable permissions">
10 10 <tr>
11 11 <th class="td-radio">${_('None')}</th>
12 12 <th class="td-radio">${_('Read')}</th>
13 13 <th class="td-radio">${_('Write')}</th>
14 14 <th class="td-radio">${_('Admin')}</th>
15 15 <th class="td-owner">${_('User/User Group')}</th>
16 16 <th class="td-action"></th>
17 17 <th class="td-action"></th>
18 18 </tr>
19 19 ## USERS
20 20 %for _user in c.repo_group.permissions():
21 21 ## super admin/owner row
22 22 %if getattr(_user, 'admin_row', None) or getattr(_user, 'owner_row', None):
23 23 <tr class="perm_admin_row">
24 24 <td class="td-radio">${h.radio('admin_perm_%s' % _user.user_id,'repository.none', disabled="disabled")}</td>
25 25 <td class="td-radio">${h.radio('admin_perm_%s' % _user.user_id,'repository.read', disabled="disabled")}</td>
26 26 <td class="td-radio">${h.radio('admin_perm_%s' % _user.user_id,'repository.write', disabled="disabled")}</td>
27 27 <td class="td-radio">${h.radio('admin_perm_%s' % _user.user_id,'repository.admin', 'repository.admin', disabled="disabled")}</td>
28 28 <td class="td-user">
29 29 ${base.gravatar(_user.email, 16, user=_user, tooltip=True)}
30 30 ${h.link_to_user(_user.username)}
31 31 %if getattr(_user, 'admin_row', None):
32 32 (${_('super-admin')})
33 33 %endif
34 34 %if getattr(_user, 'owner_row', None):
35 35 (${_('owner')})
36 36 %endif
37 37 </td>
38 38 <td></td>
39 39 <td class="quick_repo_menu">
40 40 % if c.rhodecode_user.is_admin:
41 41 <i class="icon-more"></i>
42 42 <div class="menu_items_container" style="display: none;">
43 43 <ul class="menu_items">
44 44 <li>
45 45 ${h.link_to('show permissions', h.route_path('edit_user_perms_summary', user_id=_user.user_id, _anchor='repositories-groups-permissions'))}
46 46 </li>
47 47 </ul>
48 48 </div>
49 49 % endif
50 50 </td>
51 51 </tr>
52 52 %else:
53 53 <tr>
54 54 ##forbid revoking permission from yourself, except if you're an super admin
55 55 %if c.rhodecode_user.user_id != _user.user_id or c.rhodecode_user.is_admin:
56 56 <td class="td-radio">${h.radio('u_perm_%s' % _user.user_id,'group.none', checked=_user.permission=='group.none')}</td>
57 57 <td class="td-radio">${h.radio('u_perm_%s' % _user.user_id,'group.read', checked=_user.permission=='group.read')}</td>
58 58 <td class="td-radio">${h.radio('u_perm_%s' % _user.user_id,'group.write', checked=_user.permission=='group.write')}</td>
59 59 <td class="td-radio">${h.radio('u_perm_%s' % _user.user_id,'group.admin', checked=_user.permission=='group.admin')}</td>
60 60 <td class="td-user">
61 61 ${base.gravatar(_user.email, 16, user=_user, tooltip=True)}
62 62 <span class="user">
63 63 % if _user.username == h.DEFAULT_USER:
64 ${h.DEFAULT_USER} <span class="user-perm-help-text"> - ${_('permission for all other users')}</span>
64 ${h.DEFAULT_USER}
65 % if _user.active:
66 <span class="user-perm-help-text"> - ${_('permission for other logged in and anonymous users')}</span>
67 % else:
68 <span class="user-perm-help-text"> - ${_('permission for other logged in users')}</span>
69 % endif
65 70 % else:
66 71 ${h.link_to_user(_user.username)}
67 72 %if getattr(_user, 'duplicate_perm', None):
68 73 (${_('inactive duplicate')})
69 74 %endif
70 75 % endif
71 76 </span>
72 77 </td>
73 78 <td class="td-action">
74 79 %if _user.username != h.DEFAULT_USER:
75 80 <span class="btn btn-link btn-danger revoke_perm"
76 81 member="${_user.user_id}" member_type="user">
77 82 ${_('Remove')}
78 83 </span>
79 84 %endif
80 85 </td>
81 86 <td class="quick_repo_menu">
82 87 % if c.rhodecode_user.is_admin:
83 88 <i class="icon-more"></i>
84 89 <div class="menu_items_container" style="display: none;">
85 90 <ul class="menu_items">
86 91 <li>
87 92 % if _user.username == h.DEFAULT_USER:
88 93 ${h.link_to('show permissions', h.route_path('admin_permissions_overview', _anchor='repositories-groups-permissions'))}
89 94 % else:
90 95 ${h.link_to('show permissions', h.route_path('edit_user_perms_summary', user_id=_user.user_id, _anchor='repositories-groups-permissions'))}
91 96 % endif
92 97 </li>
93 98 </ul>
94 99 </div>
95 100 % endif
96 101 </td>
97 102 %else:
98 103 ## special case for currently logged-in user permissions, we make sure he cannot take his own permissions
99 104 <td class="td-radio">${h.radio('u_perm_%s' % _user.user_id,'group.none', disabled="disabled")}</td>
100 105 <td class="td-radio">${h.radio('u_perm_%s' % _user.user_id,'group.read', disabled="disabled")}</td>
101 106 <td class="td-radio">${h.radio('u_perm_%s' % _user.user_id,'group.write', disabled="disabled")}</td>
102 107 <td class="td-radio">${h.radio('u_perm_%s' % _user.user_id,'group.admin', disabled="disabled")}</td>
103 108 <td class="td-user">
104 109 ${base.gravatar(_user.email, 16, user=_user, tooltip=True)}
105 110 <span class="user">
106 111 % if _user.username == h.DEFAULT_USER:
107 ${h.DEFAULT_USER} <span class="user-perm-help-text"> - ${_('permission for all other users')}</span>
112 ${h.DEFAULT_USER}
113 % if _user.active:
114 <span class="user-perm-help-text"> - ${_('permission for other logged in and anonymous users')}</span>
115 % else:
116 <span class="user-perm-help-text"> - ${_('permission for other logged in users')}</span>
117 % endif
108 118 % else:
109 119 ${h.link_to_user(_user.username)}
110 120 %if getattr(_user, 'duplicate_perm', None):
111 121 (${_('inactive duplicate')})
112 122 %endif
113 123 % endif
114 124 <span class="user-perm-help-text">(${_('delegated admin')})</span>
115 125 </span>
116 126 </td>
117 127 <td></td>
118 128 <td class="quick_repo_menu">
119 129 % if c.rhodecode_user.is_admin:
120 130 <i class="icon-more"></i>
121 131 <div class="menu_items_container" style="display: none;">
122 132 <ul class="menu_items">
123 133 <li>
124 134 ${h.link_to('show permissions', h.route_path('edit_user_perms_summary', user_id=_user.user_id, _anchor='repositories-groups-permissions'))}
125 135 </li>
126 136 </ul>
127 137 </div>
128 138 % endif
129 139 </td>
130 140 %endif
131 141 </tr>
132 142 %endif
133 143 %endfor
134 144
135 145 ## USER GROUPS
136 146 %for _user_group in c.repo_group.permission_user_groups(with_members=True):
137 147 <tr id="id${id(_user_group.users_group_name)}">
138 148 <td class="td-radio">${h.radio('g_perm_%s' % _user_group.users_group_id,'group.none', checked=_user_group.permission=='group.none')}</td>
139 149 <td class="td-radio">${h.radio('g_perm_%s' % _user_group.users_group_id,'group.read', checked=_user_group.permission=='group.read')}</td>
140 150 <td class="td-radio">${h.radio('g_perm_%s' % _user_group.users_group_id,'group.write', checked=_user_group.permission=='group.write')}</td>
141 151 <td class="td-radio">${h.radio('g_perm_%s' % _user_group.users_group_id,'group.admin', checked=_user_group.permission=='group.admin')}</td>
142 152 <td class="td-componentname">
143 153 ${base.user_group_icon(_user_group, tooltip=True)}
144 154
145 155 %if c.is_super_admin:
146 156 <a href="${h.route_path('edit_user_group',user_group_id=_user_group.users_group_id)}">
147 157 ${_user_group.users_group_name}
148 158 </a>
149 159 %else:
150 160 ${h.link_to_group(_user_group.users_group_name)}
151 161 %endif
152 162 (${_('members')}: ${len(_user_group.members)})
153 163 </td>
154 164 <td class="td-action">
155 165 <span class="btn btn-link btn-danger revoke_perm"
156 166 member="${_user_group.users_group_id}" member_type="user_group">
157 167 ${_('Remove')}
158 168 </span>
159 169 </td>
160 170 <td class="quick_repo_menu">
161 171 % if c.rhodecode_user.is_admin:
162 172 <i class="icon-more"></i>
163 173 <div class="menu_items_container" style="display: none;">
164 174 <ul class="menu_items">
165 175 <li>
166 176 ${h.link_to('show permissions', h.route_path('edit_user_group_perms_summary', user_group_id=_user_group.users_group_id, _anchor='repositories-groups-permissions'))}
167 177 </li>
168 178 </ul>
169 179 </div>
170 180 % endif
171 181 </td>
172 182 </tr>
173 183 %endfor
174 184
175 185 <tr class="new_members" id="add_perm_input"></tr>
176 186 <tr>
177 187 <td></td>
178 188 <td></td>
179 189 <td></td>
180 190 <td></td>
181 191 <td></td>
182 192 <td>
183 193 <span id="add_perm" class="link">
184 194 ${_('Add user/user group')}
185 195 </span>
186 196 </td>
187 197 <td></td>
188 198 </tr>
189 199 </table>
190 200
191 201 <div class="fields">
192 202 <div class="field">
193 203 <div class="label label-radio">
194 204 ${_('Apply to children')}:
195 205 </div>
196 206 <div class="radios">
197 207 ${h.radio('recursive', 'none', label=_('None'), checked="checked")}
198 208 ${h.radio('recursive', 'groups', label=_('Repository Groups'))}
199 209 ${h.radio('recursive', 'repos', label=_('Repositories'))}
200 210 ${h.radio('recursive', 'all', label=_('Both'))}
201 211 <span class="help-block">${_('Set or revoke permissions to selected types of children of this group, including non-private repositories and other groups if chosen.')}</span>
202 212 </div>
203 213 </div>
204 214 </div>
205 215 <div class="buttons">
206 216 ${h.submit('save',_('Save'),class_="btn btn-primary")}
207 217 ${h.reset('reset',_('Reset'),class_="btn btn-danger")}
208 218 </div>
209 219 ${h.end_form()}
210 220 </div>
211 221 </div>
212 222 <script type="text/javascript">
213 223 $('#add_perm').on('click', function(e){
214 224 addNewPermInput($(this), 'group');
215 225 });
216 226 $('.revoke_perm').on('click', function(e){
217 227 markRevokePermInput($(this), 'group');
218 228 });
219 229 quick_repo_menu();
220 230 </script>
@@ -1,227 +1,232 b''
1 1 <%namespace name="base" file="/base/base.mako"/>
2 2
3 3 <div class="panel panel-default">
4 4 <div class="panel-heading">
5 5 <h3 class="panel-title">${_('Repository Access Permissions')}</h3>
6 6 </div>
7 7 <div class="panel-body">
8 8 ${h.secure_form(h.route_path('edit_repo_perms', repo_name=c.repo_name), request=request)}
9 9 <table id="permissions_manage" class="rctable permissions">
10 10 <tr>
11 11 <th class="td-radio">${_('None')}</th>
12 12 <th class="td-radio">${_('Read')}</th>
13 13 <th class="td-radio">${_('Write')}</th>
14 14 <th class="td-radio">${_('Admin')}</th>
15 15 <th class="td-owner">${_('User/User Group')}</th>
16 16 <th class="td-action"></th>
17 17 <th class="td-action"></th>
18 18 </tr>
19 19 ## USERS
20 20 %for _user in c.rhodecode_db_repo.permissions():
21 21 %if getattr(_user, 'admin_row', None) or getattr(_user, 'owner_row', None):
22 22 <tr class="perm_admin_row">
23 23 <td class="td-radio">${h.radio('admin_perm_%s' % _user.user_id,'repository.none', disabled="disabled")}</td>
24 24 <td class="td-radio">${h.radio('admin_perm_%s' % _user.user_id,'repository.read', disabled="disabled")}</td>
25 25 <td class="td-radio">${h.radio('admin_perm_%s' % _user.user_id,'repository.write', disabled="disabled")}</td>
26 26 <td class="td-radio">${h.radio('admin_perm_%s' % _user.user_id,'repository.admin', 'repository.admin', disabled="disabled")}</td>
27 27 <td class="td-user">
28 28 ${base.gravatar(_user.email, 16, user=_user, tooltip=True)}
29 29 ${h.link_to_user(_user.username)}
30 30 %if getattr(_user, 'admin_row', None):
31 31 (${_('super-admin')})
32 32 %endif
33 33 %if getattr(_user, 'owner_row', None):
34 34 (${_('owner')})
35 35 %endif
36 36 </td>
37 37 <td></td>
38 38 <td class="quick_repo_menu">
39 39 % if c.rhodecode_user.is_admin:
40 40 <i class="icon-more"></i>
41 41 <div class="menu_items_container" style="display: none;">
42 42 <ul class="menu_items">
43 43 <li>
44 44 ${h.link_to('show permissions', h.route_path('edit_user_perms_summary', user_id=_user.user_id, _anchor='repositories-permissions'))}
45 45 </li>
46 46 </ul>
47 47 </div>
48 48 % endif
49 49 </td>
50 50 </tr>
51 51 %elif _user.username == h.DEFAULT_USER and c.rhodecode_db_repo.private:
52 52 <tr>
53 53 <td colspan="4">
54 54 <span class="private_repo_msg">
55 55 <strong title="${h.tooltip(_user.permission)}">${_('private repository')}</strong>
56 56 </span>
57 57 </td>
58 58 <td class="private_repo_msg">
59 59 ${base.gravatar(h.DEFAULT_USER_EMAIL, 16)}
60 60 ${h.DEFAULT_USER} - ${_('only users/user groups explicitly added here will have access')}</td>
61 61 <td class="td-action">
62 62 <span class="tooltip btn btn-link btn-default" onclick="setPrivateRepo(false); return false" title="${_('Private repositories are only visible to people explicitly added as collaborators. Default permissions wont apply')}">
63 63 ${_('un-set private mode')}
64 64 </span>
65 65 </td>
66 66 <td class="quick_repo_menu">
67 67 % if c.rhodecode_user.is_admin:
68 68 <i class="icon-more"></i>
69 69 <div class="menu_items_container" style="display: none;">
70 70 <ul class="menu_items">
71 71 <li>
72 72 ${h.link_to('show permissions', h.route_path('admin_permissions_overview', _anchor='repositories-permissions'))}
73 73 </li>
74 74 </ul>
75 75 </div>
76 76 % endif
77 77 </td>
78 78 </tr>
79 79 %else:
80 80 <% used_by_n_rules = len(getattr(_user, 'branch_rules', None) or []) %>
81 81 <tr>
82 82 <td class="td-radio">${h.radio('u_perm_%s' % _user.user_id,'repository.none', checked=_user.permission=='repository.none', disabled="disabled" if (used_by_n_rules and _user.username != h.DEFAULT_USER) else None)}</td>
83 83 <td class="td-radio">${h.radio('u_perm_%s' % _user.user_id,'repository.read', checked=_user.permission=='repository.read', disabled="disabled" if (used_by_n_rules and _user.username != h.DEFAULT_USER) else None)}</td>
84 84 <td class="td-radio">${h.radio('u_perm_%s' % _user.user_id,'repository.write', checked=_user.permission=='repository.write')}</td>
85 85 <td class="td-radio">${h.radio('u_perm_%s' % _user.user_id,'repository.admin', checked=_user.permission=='repository.admin')}</td>
86 86 <td class="td-user">
87 87 ${base.gravatar(_user.email, 16, user=_user, tooltip=True)}
88 88 <span class="user">
89 89 % if _user.username == h.DEFAULT_USER:
90 ${h.DEFAULT_USER} <span class="user-perm-help-text"> - ${_('permission for all other users')}</span>
90 ${h.DEFAULT_USER}
91 % if _user.active:
92 <span class="user-perm-help-text"> - ${_('permission for other logged in and anonymous users')}</span>
93 % else:
94 <span class="user-perm-help-text"> - ${_('permission for other logged in users')}</span>
95 % endif
91 96 % else:
92 97 ${h.link_to_user(_user.username)}
93 98 %if getattr(_user, 'duplicate_perm', None):
94 99 (${_('inactive duplicate')})
95 100 %endif
96 101 %if getattr(_user, 'branch_rules', None):
97 102 % if used_by_n_rules == 1:
98 103 (${_('used by {} branch rule, requires write+ permissions').format(used_by_n_rules)})
99 104 % else:
100 105 (${_('used by {} branch rules, requires write+ permissions').format(used_by_n_rules)})
101 106 % endif
102 107 %endif
103 108 % endif
104 109 </span>
105 110 </td>
106 111 <td class="td-action">
107 112 %if _user.username != h.DEFAULT_USER and getattr(_user, 'branch_rules', None) is None:
108 113 <span class="btn btn-link btn-danger revoke_perm"
109 114 member="${_user.user_id}" member_type="user">
110 115 ${_('Remove')}
111 116 </span>
112 117 %elif _user.username == h.DEFAULT_USER:
113 118 <span class="tooltip btn btn-link btn-default" onclick="setPrivateRepo(true); return false" title="${_('Private repositories are only visible to people explicitly added as collaborators. Default permissions wont apply')}">
114 119 ${_('set private mode')}
115 120 </span>
116 121 %endif
117 122 </td>
118 123 <td class="quick_repo_menu">
119 124 % if c.rhodecode_user.is_admin:
120 125 <i class="icon-more"></i>
121 126 <div class="menu_items_container" style="display: none;">
122 127 <ul class="menu_items">
123 128 <li>
124 129 % if _user.username == h.DEFAULT_USER:
125 130 ${h.link_to('show permissions', h.route_path('admin_permissions_overview', _anchor='repositories-permissions'))}
126 131 % else:
127 132 ${h.link_to('show permissions', h.route_path('edit_user_perms_summary', user_id=_user.user_id, _anchor='repositories-permissions'))}
128 133 % endif
129 134 </li>
130 135 </ul>
131 136 </div>
132 137 % endif
133 138 </td>
134 139 </tr>
135 140 %endif
136 141 %endfor
137 142
138 143 ## USER GROUPS
139 144 %for _user_group in c.rhodecode_db_repo.permission_user_groups(with_members=True):
140 145 <tr>
141 146 <td class="td-radio">${h.radio('g_perm_%s' % _user_group.users_group_id,'repository.none', checked=_user_group.permission=='repository.none')}</td>
142 147 <td class="td-radio">${h.radio('g_perm_%s' % _user_group.users_group_id,'repository.read', checked=_user_group.permission=='repository.read')}</td>
143 148 <td class="td-radio">${h.radio('g_perm_%s' % _user_group.users_group_id,'repository.write', checked=_user_group.permission=='repository.write')}</td>
144 149 <td class="td-radio">${h.radio('g_perm_%s' % _user_group.users_group_id,'repository.admin', checked=_user_group.permission=='repository.admin')}</td>
145 150 <td class="td-componentname">
146 151 ${base.user_group_icon(_user_group, tooltip=True)}
147 152 %if c.is_super_admin:
148 153 <a href="${h.route_path('edit_user_group',user_group_id=_user_group.users_group_id)}">
149 154 ${_user_group.users_group_name}
150 155 </a>
151 156 %else:
152 157 ${h.link_to_group(_user_group.users_group_name)}
153 158 %endif
154 159 (${_('members')}: ${len(_user_group.members)})
155 160 </td>
156 161 <td class="td-action">
157 162 <span class="btn btn-link btn-danger revoke_perm"
158 163 member="${_user_group.users_group_id}" member_type="user_group">
159 164 ${_('Remove')}
160 165 </span>
161 166 </td>
162 167 <td class="quick_repo_menu">
163 168 % if c.rhodecode_user.is_admin:
164 169 <i class="icon-more"></i>
165 170 <div class="menu_items_container" style="display: none;">
166 171 <ul class="menu_items">
167 172 <li>
168 173 ${h.link_to('show permissions', h.route_path('edit_user_group_perms_summary', user_group_id=_user_group.users_group_id, _anchor='repositories-permissions'))}
169 174 </li>
170 175 </ul>
171 176 </div>
172 177 % endif
173 178 </td>
174 179 </tr>
175 180 %endfor
176 181 <tr class="new_members" id="add_perm_input"></tr>
177 182
178 183 <tr>
179 184 <td></td>
180 185 <td></td>
181 186 <td></td>
182 187 <td></td>
183 188 <td></td>
184 189 <td>
185 190 <span id="add_perm" class="link">
186 191 ${_('Add user/user group')}
187 192 </span>
188 193 </td>
189 194 <td></td>
190 195 </tr>
191 196
192 197 </table>
193 198
194 199 <div class="buttons">
195 200 ${h.submit('save',_('Save'),class_="btn btn-primary")}
196 201 ${h.reset('reset',_('Reset'),class_="btn btn-danger")}
197 202 </div>
198 203 ${h.end_form()}
199 204 </div>
200 205 </div>
201 206
202 207 <script type="text/javascript">
203 208 $('#add_perm').on('click', function(e){
204 209 addNewPermInput($(this), 'repository');
205 210 });
206 211 $('.revoke_perm').on('click', function(e){
207 212 markRevokePermInput($(this), 'repository');
208 213 });
209 214 quick_repo_menu();
210 215
211 216 var setPrivateRepo = function (private) {
212 217 var postData = {
213 218 'csrf_token': CSRF_TOKEN,
214 219 'private': private
215 220 };
216 221
217 222 var success = function(o) {
218 223 var defaultUrl = pyroutes.url('edit_repo_perms', {"repo_name": templateContext.repo_name});
219 224 window.location = o.redirect_url || defaultUrl;
220 225 };
221 226
222 227 ajaxPOST(
223 228 pyroutes.url('edit_repo_perms_set_private', {"repo_name": templateContext.repo_name}),
224 229 postData,
225 230 success);
226 231 }
227 232 </script>
@@ -1,207 +1,217 b''
1 1 <%namespace name="base" file="/base/base.mako"/>
2 2
3 3 <div class="panel panel-default">
4 4 <div class="panel-heading">
5 5 <h3 class="panel-title">${_('User Group Permissions')}</h3>
6 6 </div>
7 7 <div class="panel-body">
8 8 ${h.secure_form(h.route_path('edit_user_group_perms_update', user_group_id=c.user_group.users_group_id), request=request)}
9 9 <table id="permissions_manage" class="rctable permissions">
10 10 <tr>
11 11 <th class="td-radio">${_('None')}</th>
12 12 <th class="td-radio">${_('Read')}</th>
13 13 <th class="td-radio">${_('Write')}</th>
14 14 <th class="td-radio">${_('Admin')}</th>
15 15 <th>${_('User/User Group')}</th>
16 16 <th class="td-action"></th>
17 17 <th class="td-action"></th>
18 18 </tr>
19 19 ## USERS
20 20 %for _user in c.user_group.permissions():
21 21 ## super admin/owner row
22 22 %if getattr(_user, 'admin_row', None) or getattr(_user, 'owner_row', None):
23 23 <tr class="perm_admin_row">
24 24 <td class="td-radio">${h.radio('admin_perm_%s' % _user.user_id,'repository.none', disabled="disabled")}</td>
25 25 <td class="td-radio">${h.radio('admin_perm_%s' % _user.user_id,'repository.read', disabled="disabled")}</td>
26 26 <td class="td-radio">${h.radio('admin_perm_%s' % _user.user_id,'repository.write', disabled="disabled")}</td>
27 27 <td class="td-radio">${h.radio('admin_perm_%s' % _user.user_id,'repository.admin', 'repository.admin', disabled="disabled")}</td>
28 28 <td class="td-user">
29 29 ${base.gravatar(_user.email, 16, user=_user, tooltip=True)}
30 30 <span class="user">
31 31 ${h.link_to_user(_user.username)}
32 32 %if getattr(_user, 'admin_row', None):
33 33 (${_('super-admin')})
34 34 %endif
35 35 %if getattr(_user, 'owner_row', None):
36 36 (${_('owner')})
37 37 %endif
38 38 </span>
39 39 </td>
40 40 <td></td>
41 41 <td class="quick_repo_menu">
42 42 % if c.rhodecode_user.is_admin:
43 43 <i class="icon-more"></i>
44 44 <div class="menu_items_container" style="display: none;">
45 45 <ul class="menu_items">
46 46 <li>
47 47 ${h.link_to('show permissions', h.route_path('edit_user_perms_summary', user_id=_user.user_id, _anchor='user-groups-permissions'))}
48 48 </li>
49 49 </ul>
50 50 </div>
51 51 % endif
52 52 </td>
53 53 </tr>
54 54 %else:
55 55 ##forbid revoking permission from yourself, except if you're an super admin
56 56 <tr>
57 57 %if c.rhodecode_user.user_id != _user.user_id or c.rhodecode_user.is_admin:
58 58 <td class="td-radio">${h.radio('u_perm_%s' % _user.user_id,'usergroup.none')}</td>
59 59 <td class="td-radio">${h.radio('u_perm_%s' % _user.user_id,'usergroup.read')}</td>
60 60 <td class="td-radio">${h.radio('u_perm_%s' % _user.user_id,'usergroup.write')}</td>
61 61 <td class="td-radio">${h.radio('u_perm_%s' % _user.user_id,'usergroup.admin')}</td>
62 62 <td class="td-user">
63 63 ${base.gravatar(_user.email, 16, user=_user, tooltip=True)}
64 64 <span class="user">
65 65 % if _user.username == h.DEFAULT_USER:
66 ${h.DEFAULT_USER} <span class="user-perm-help-text"> - ${_('permission for all other users')}</span>
66 ${h.DEFAULT_USER}
67 % if _user.active:
68 <span class="user-perm-help-text"> - ${_('permission for other logged in and anonymous users')}</span>
69 % else:
70 <span class="user-perm-help-text"> - ${_('permission for other logged in users')}</span>
71 % endif
67 72 % else:
68 73 ${h.link_to_user(_user.username)}
69 74 %if getattr(_user, 'duplicate_perm', None):
70 75 (${_('inactive duplicate')})
71 76 %endif
72 77 % endif
73 78 </span>
74 79 </td>
75 80 <td class="td-action">
76 81 %if _user.username != h.DEFAULT_USER:
77 82 <span class="btn btn-link btn-danger revoke_perm"
78 83 member="${_user.user_id}" member_type="user">
79 84 ${_('Remove')}
80 85 </span>
81 86 %endif
82 87 </td>
83 88 <td class="quick_repo_menu">
84 89 % if c.rhodecode_user.is_admin:
85 90 <i class="icon-more"></i>
86 91 <div class="menu_items_container" style="display: none;">
87 92 <ul class="menu_items">
88 93 <li>
89 94 % if _user.username == h.DEFAULT_USER:
90 95 ${h.link_to('show permissions', h.route_path('admin_permissions_overview', _anchor='user-groups-permissions'))}
91 96 % else:
92 97 ${h.link_to('show permissions', h.route_path('edit_user_perms_summary', user_id=_user.user_id, _anchor='user-groups-permissions'))}
93 98 % endif
94 99 </li>
95 100 </ul>
96 101 </div>
97 102 % endif
98 103 </td>
99 104 %else:
100 105 ## special case for currently logged-in user permissions, we make sure he cannot take his own permissions
101 106 <td class="td-radio">${h.radio('u_perm_%s' % _user.user_id,'usergroup.none', disabled="disabled")}</td>
102 107 <td class="td-radio">${h.radio('u_perm_%s' % _user.user_id,'usergroup.read', disabled="disabled")}</td>
103 108 <td class="td-radio">${h.radio('u_perm_%s' % _user.user_id,'usergroup.write', disabled="disabled")}</td>
104 109 <td class="td-radio">${h.radio('u_perm_%s' % _user.user_id,'usergroup.admin', disabled="disabled")}</td>
105 110 <td class="td-user">
106 111 ${base.gravatar(_user.email, 16, user=_user, tooltip=True)}
107 112 <span class="user">
108 113 % if _user.username == h.DEFAULT_USER:
109 ${h.DEFAULT_USER} <span class="user-perm-help-text"> - ${_('permission for all other users')}</span>
114 ${h.DEFAULT_USER}
115 % if _user.active:
116 <span class="user-perm-help-text"> - ${_('permission for other logged in and anonymous users')}</span>
117 % else:
118 <span class="user-perm-help-text"> - ${_('permission for other logged in users')}</span>
119 % endif
110 120 % else:
111 121 ${h.link_to_user(_user.username)}
112 122 %if getattr(_user, 'duplicate_perm', None):
113 123 (${_('inactive duplicate')})
114 124 %endif
115 125 % endif
116 126 <span class="user-perm-help-text">(${_('delegated admin')})</span>
117 127 </span>
118 128 </td>
119 129 <td></td>
120 130 <td class="quick_repo_menu">
121 131 % if c.rhodecode_user.is_admin:
122 132 <i class="icon-more"></i>
123 133 <div class="menu_items_container" style="display: none;">
124 134 <ul class="menu_items">
125 135 <li>
126 136 ${h.link_to('show permissions', h.route_path('edit_user_perms_summary', user_id=_user.user_id, _anchor='user-groups-permissions'))}
127 137 </li>
128 138 </ul>
129 139 </div>
130 140 % endif
131 141 </td>
132 142 %endif
133 143 </tr>
134 144 %endif
135 145 %endfor
136 146
137 147 ## USER GROUPS
138 148 %for _user_group in c.user_group.permission_user_groups(with_members=True):
139 149 <tr>
140 150 <td class="td-radio">${h.radio('g_perm_%s' % _user_group.users_group_id,'usergroup.none')}</td>
141 151 <td class="td-radio">${h.radio('g_perm_%s' % _user_group.users_group_id,'usergroup.read')}</td>
142 152 <td class="td-radio">${h.radio('g_perm_%s' % _user_group.users_group_id,'usergroup.write')}</td>
143 153 <td class="td-radio">${h.radio('g_perm_%s' % _user_group.users_group_id,'usergroup.admin')}</td>
144 154 <td class="td-user">
145 155 <i class="icon-user-group"></i>
146 156 %if c.is_super_admin:
147 157 <a href="${h.route_path('edit_user_group',user_group_id=_user_group.users_group_id)}">
148 158 ${_user_group.users_group_name}
149 159 </a>
150 160 %else:
151 161 ${h.link_to_group(_user_group.users_group_name)}
152 162 %endif
153 163 (${_('members')}: ${len(_user_group.members)})
154 164 </td>
155 165 <td class="td-action">
156 166 <span class="btn btn-link btn-danger revoke_perm"
157 167 member="${_user_group.users_group_id}" member_type="user_group">
158 168 ${_('Remove')}
159 169 </span>
160 170 </td>
161 171 <td class="quick_repo_menu">
162 172 % if c.rhodecode_user.is_admin:
163 173 <i class="icon-more"></i>
164 174 <div class="menu_items_container" style="display: none;">
165 175 <ul class="menu_items">
166 176 <li>
167 177 ${h.link_to('show permissions', h.route_path('edit_user_group_perms_summary', user_group_id=_user_group.users_group_id, _anchor='user-groups-permissions'))}
168 178 </li>
169 179 </ul>
170 180 </div>
171 181 % endif
172 182 </td>
173 183 </tr>
174 184 %endfor
175 185 <tr class="new_members" id="add_perm_input"></tr>
176 186 <tr>
177 187 <td></td>
178 188 <td></td>
179 189 <td></td>
180 190 <td></td>
181 191 <td></td>
182 192 <td>
183 193 <span id="add_perm" class="link">
184 194 ${_('Add user/user group')}
185 195 </span>
186 196 </td>
187 197 <td></td>
188 198 </tr>
189 199 </table>
190 200
191 201 <div class="buttons">
192 202 ${h.submit('save',_('Save'),class_="btn btn-primary")}
193 203 ${h.reset('reset',_('Reset'),class_="btn btn-danger")}
194 204 </div>
195 205 ${h.end_form()}
196 206 </div>
197 207 </div>
198 208
199 209 <script type="text/javascript">
200 210 $('#add_perm').on('click', function(e){
201 211 addNewPermInput($(this), 'usergroup');
202 212 });
203 213 $('.revoke_perm').on('click', function(e){
204 214 markRevokePermInput($(this), 'usergroup');
205 215 });
206 216 quick_repo_menu()
207 217 </script>
General Comments 0
You need to be logged in to leave comments. Login now