feat(auth): restrict sensitive data visibility for team members

Hide database passwords, connection URLs, and debug logs from team members:
- Database components: hide passwords and connection URLs for members
- Deployment UI: gate debug log toggle behind update permission
- Debug logs: prevent members from viewing debug output
- Storage/services: hide sensitive credentials from members

Members can still view non-sensitive configuration while admins retain full access to all data.
This commit is contained in:
Andras Bacsai committed 2026-02-27 22:42:48 +01:00
1 parent 0636789071
commit c924655999
27 files changed
+382 -119

No files matched your search

@@ -66,6 +66,8 @@ class General extends Component
public ?Carbon $certificateValidUntil = null;
public bool $isPasswordHiddenForMember = false;
public function getListeners()
{
$userId = Auth::id();
@@ -155,6 +157,13 @@ class General extends Component
} catch (Exception $e) {
return handleError($e, $this);
}
$this->isPasswordHiddenForMember = auth()->user()?->isMember() ?? false;
if ($this->isPasswordHiddenForMember) {
$this->postgresPassword = '';
$this->db_url = null;
$this->db_url_public = null;
}
}
public function syncData(bool $toModel = false)