Skip to content

Commit 40f2cdb

Browse files
authored
Merge pull request #131 from Ente/plugin-perms
v8.4.2: user-based permissions for plugins
2 parents 7bcf2a8 + a32e54e commit 40f2cdb

File tree

14 files changed

+232
-99
lines changed

14 files changed

+232
-99
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
# CHANGELOG
22

3+
## v8.4.2
4+
5+
* Added user based permissions for plugin views.
6+
* Updated plugins to use new permission system.
7+
38
## v8.4.1
49

510
**This update requires DB migration** - see `README.md` section `Database`

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
8.4.1
1+
8.4.2

api/v1/class/plugins/PluginBuilder.plugins.arbeit.inc.php

Lines changed: 183 additions & 84 deletions
Large diffs are not rendered by default.

api/v1/class/plugins/docs/Plugins.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,17 @@ These are optional values you can add, which might make things easier:
4444
- `build.instructions`: Allows you to add parameters to change the behaviour of the PluginBuilder.
4545
- `required`: An array containing relative paths to the required files, they will then get included within the archive (PHAR)
4646
- `nav_links`: If your plugin has a front-end, please specify this attribute. It is stored in key-value pairs, e.g. "Send Message": "views/send-message.php" - Views have to be always in the `/views` folder within your plugin folder
47+
- `nav_permissions`: Key-value pairs to restrict certain navigation links to certian permissions. E.g.:
48+
49+
```yaml
50+
51+
nav_links:
52+
Admin View: views/admin.php
53+
User View: views/user.php
54+
nav_permissions:
55+
Admin View: 1
56+
User View: 0
57+
```
4758
4859
### Permissions
4960

api/v1/class/plugins/plugins/codeclock/plugin.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,7 @@ custom.values:
1212
license: "LIC"
1313
nav_links:
1414
View PIN: views/index.php
15-
Admin View: views/admin.php
15+
Admin View: views/admin.php
16+
nav_permissions:
17+
View PIN: 0
18+
Admin View: 1

api/v1/class/plugins/plugins/exportmanager/plugin.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,6 @@ enabled: false
1111
custom.values:
1212
license: "LIC"
1313
nav_links:
14-
Open ExportManager: views/redirect.php
14+
Open ExportManager: views/redirect.php
15+
nav_permissions:
16+
Open ExportManager: 1

api/v1/class/plugins/plugins/nfcclock/plugin.yml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,10 @@ api: 0.1
99
permissions: none
1010
enabled: true
1111
custom.values:
12-
license: LIC
12+
license: LIC
1313
nav_links:
14-
'Open NFCClock': views/open.php
15-
'Open About Page': views/index.php
14+
'Open NFCClock': views/open.php
15+
'Open About Page': views/index.php
16+
nav_permissions:
17+
'Open NFCClock': 0
18+
'Open About Page': 0

api/v1/class/plugins/plugins/nfclogin/plugin.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ api: 0.1
99
permissions: none
1010
enabled: true
1111
custom.values:
12-
license: LIC
12+
license: LIC
1313
nav_links:
14-
'Manage Cards': views/cards.php
14+
'Manage Cards': views/cards.php
15+
nav_permissions:
16+
'Manage Cards': 1

api/v1/class/plugins/plugins/pluginmanager/plugin.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,6 @@ enabled: true
1111
custom.values:
1212
license: "LIC"
1313
nav_links:
14-
Open PluginManager: views/redirect.php
14+
Open PluginManager: views/redirect.php
15+
nav_permissions:
16+
Open PluginManager: 1

api/v1/class/plugins/plugins/qrclock/plugin.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,6 @@ enabled: false
1111
custom.values:
1212
license: "LIC"
1313
nav_links:
14-
Generate QR code: views/index.php
14+
Generate QR code: views/index.php
15+
nav_permissions:
16+
Generate QR code: 0

0 commit comments

Comments
 (0)