From 086e2d2668784469ec114f6e6fd2b3dace3d7c3b Mon Sep 17 00:00:00 2001 From: Jonas Kohl Date: Thu, 12 Sep 2024 19:49:17 +0200 Subject: Way more progress on forum --- src/application/mystic/forum/orm/Attachment.php | 18 +++++++ src/application/mystic/forum/orm/Post.php | 6 ++- src/application/mystic/forum/orm/Topic.php | 5 +- src/application/mystic/forum/orm/User.php | 16 +++++- .../mystic/forum/orm/UserPermissions.php | 59 ++++++++++++++++++++++ 5 files changed, 99 insertions(+), 5 deletions(-) create mode 100644 src/application/mystic/forum/orm/Attachment.php create mode 100644 src/application/mystic/forum/orm/UserPermissions.php (limited to 'src/application/mystic/forum/orm') diff --git a/src/application/mystic/forum/orm/Attachment.php b/src/application/mystic/forum/orm/Attachment.php new file mode 100644 index 0000000..64e357c --- /dev/null +++ b/src/application/mystic/forum/orm/Attachment.php @@ -0,0 +1,18 @@ +id === self::SUPERUSER_ID) + return true; + return ($this->permissionMask & $perm) === $perm; + } } diff --git a/src/application/mystic/forum/orm/UserPermissions.php b/src/application/mystic/forum/orm/UserPermissions.php new file mode 100644 index 0000000..cd2fdf4 --- /dev/null +++ b/src/application/mystic/forum/orm/UserPermissions.php @@ -0,0 +1,59 @@ +