20 Commits

Author SHA1 Message Date
Boy132
fc643f57f9
Admin Roles (#502)
* add spatie/permissions

* add policies

* add role resource

* add root admin role handling

* replace some "root_admin" with function

* add model specific permissions

* make permission selection nicer

* fix user creation

* fix tests

* add back subuser checks in server policy

* add custom model for role

* assign new users to role if root_admin is set

* add api for roles

* fix phpstan

* add permissions for settings page

* remove "restore" and "forceDelete" permissions

* add user count to list

* prevent deletion if role has users

* update user list

* fix server policy

* remove old `root_admin` column

* small refactor

* fix tests

* forgot can checks here

* forgot use

* disable editing own roles & disable assigning root admin

* don't allow to rename root admin role

* remove php bombing exception handler

* fix role assignment when creating a user

* fix disableOptionWhen

* fix missing `root_admin` attribute on react frontend

* add permission check for bulk delete

* rename viewAny to viewList

* improve canAccessPanel check

* fix admin not displaying for non-root admins

* make sure non root admins can't edit root admins

* fix import

* fix settings page permission check

* fix server permissions for non-subusers

* fix settings page permission check v2

* small cleanup

* cleanup config file

* move consts from resouce into enum & model

* Update database/migrations/2024_08_01_114538_remove_root_admin_column.php

Co-authored-by: Lance Pioch <lancepioch@gmail.com>

* fix config

* fix phpstan

* fix phpstan 2.0

---------

Co-authored-by: Lance Pioch <lancepioch@gmail.com>
2024-09-21 12:27:41 +02:00
Lance Pioch
d409ff037c Fix route 2024-05-11 21:01:07 -04:00
notCharles
f9247c9318 Update Nav Bar, '/new-admin' > '/panel'
We cannot replace `/admin` as some functions still call the old admin area, Exporting Eggs
2024-05-11 18:54:47 -04:00
Lance Pioch
8f2413dc7e Add front end translations
Co-authored-by: Miniontoby <tobias.gaarenstroom@gmail.com>
2024-04-25 23:33:08 -04:00
DaneEveritt
922d75f471
fix remaining eslint error 2022-06-26 15:30:05 -04:00
DaneEveritt
dc84af9937
Apply new eslint rules; default to prettier for styling 2022-06-26 15:13:52 -04:00
DaneEveritt
3834aca3fe
Use nicer avatars when showing activity log 2022-06-19 13:46:15 -04:00
DaneEveritt
f860fd2cfe
Improve usability of icon buttons in header with tooltip 2022-06-12 09:35:02 -04:00
Dane Everitt
45999ba4ee
(security) use POST for logout rather than GET
see https://github.com/pterodactyl/panel/security/advisories/GHSA-m49f-hcxp-6hm6
2021-10-23 13:00:21 -07:00
Dane Everitt
22687bd078
Stop caching stupid things and causing builds to die 2020-12-26 10:41:25 -08:00
Anders G. Jørgensen
7ad26fc456
Remove target="blank" from /admin link
This should be changed to make it consistent with the admin panel, where the link back to the user panel does not open in a new tab.
2020-10-16 15:49:35 +02:00
Rihan
9a4c0d8ba7
Make interface mobile responsive (#2273) 2020-09-13 10:02:25 -07:00
Dane Everitt
1598dac6f8
Remove more references to useServer 2020-08-25 21:39:00 -07:00
Dane Everitt
1e163aa792
Get server console page rendering (mostly) correctly 2020-07-04 15:40:41 -07:00
Dane Everitt
d93e804a31
Get server listing design working mostly correct 2020-07-03 14:50:37 -07:00
Dane Everitt
0dbf6b51b5
Add very simple search support to pages, togglable with "k" 2020-04-03 22:39:53 -07:00
Dane Everitt
8965da6af0
Make the logout link actually work 2019-12-15 18:07:45 -08:00
Dane Everitt
103507d6ee
Fix site name 2019-12-15 18:07:16 -08:00
Dane Everitt
634c1cae9a
Show link to admin area in nav 2019-11-16 13:08:38 -08:00
Dane Everitt
9cb8020dbe
Add basic navigation bar 2019-06-25 21:28:56 -07:00