| 23 | |
| 24 | == Authorization == |
| 25 | |
| 26 | 1. Have it generic (ie. not per resource) and use an action/role on system |
| 27 | 2. Require all resources to attach to packages an inherit their permissions (i.e. read/write etc if and only read/write on associated packages) |
| 28 | 3. Introduce Resource in authorization system (requires migration) |
| 29 | |
| 30 | Mixed model |
| 31 | |
| 32 | {{{ |
| 33 | Create / Edit: |
| 34 | |
| 35 | if resource associated to package: |
| 36 | check_permissions(package, update) |
| 37 | else: |
| 38 | check_system_permissions(c.user, model.Action.Resouce Create/Update, model.System) |
| 39 | }}} |