Copybara | 854996b | 2021-09-07 19:36:02 +0000 | [diff] [blame] | 1 | [# Display one row in the permissions table. |
| 2 | |
| 3 | Args: |
| 4 | arg0: True if the permission is native to the role. So, it cannot be removed. |
| 5 | arg1: True if the user has this permission. So, it will be shown when not in editing mode. |
| 6 | arg2: Permission name. |
| 7 | arg3: Permission description. |
| 8 | |
| 9 | References globals: |
| 10 | offer_edit_perms: True if the user can edit permissions on this page. |
| 11 | ] |
| 12 | |
| 13 | <tr> |
| 14 | <td> |
| 15 | <input type="checkbox" [if-any arg1]checked="checked"[end] id="[arg2]" |
| 16 | [if-any offer_edit_perms] |
| 17 | [if-any arg0] |
| 18 | disabled="disabled" |
| 19 | [else] |
| 20 | name="extra_perms" value="[arg2]" |
| 21 | [end] |
| 22 | [else] |
| 23 | disabled="disabled" |
| 24 | [end] |
| 25 | > |
| 26 | <label for="[arg2]">[arg2]</label> |
| 27 | </td> |
| 28 | <td>[arg3]</td> |
| 29 | </tr> |