Skip to content

Next

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
    • Help
    • Submit feedback
    • Contribute to GitLab
    • Switch to GitLab Next
  • Sign in / Register
Minds Backend - Engine
Minds Backend - Engine
  • Project
    • Project
    • Details
    • Activity
    • Releases
    • Dependency List
    • Cycle Analytics
    • Insights
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Charts
    • Locked Files
  • Issues 204
    • Issues 204
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Merge Requests 29
    • Merge Requests 29
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
    • Charts
  • Packages
    • Packages
    • List
    • Container Registry
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Charts
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • Minds
  • Minds Backend - EngineMinds Backend - Engine
  • Merge Requests
  • !290

Open
Opened 15 hours ago by Brian Hatchet@brianhatchet:speech_balloon:
  • Report abuse
Report abuse

WIP: Feature/permissions rbac 600

Check out, review, and merge locally

Step 1. Fetch and check out the branch for this merge request

git fetch origin
git checkout -b feature/permissions-rbac-600 origin/feature/permissions-rbac-600

Step 2. Review the changes locally

Step 3. Merge the branch and fix any conflicts that come up

git fetch origin
git checkout origin/epic/permissions-open-channels
git merge --no-ff feature/permissions-rbac-600

Step 4. Push the result of the merge to GitLab

git push origin epic/permissions-open-channels

Note that pushing to GitLab requires write access to this repository.

Tip: You can also checkout merge requests locally by following these guidelines.

Request to merge feature/permissions-rbac-600 into epic/permissions-open-channels
Open in Web IDE
  • Email patches
  • Plain diff
Pipeline #74989098 failed for 526aae86 on feature/permissions-rbac-600
          Requires 2 more approvals from Devs and Deployers.
          Ben Hayward
          Ben Hayward
          Marcelo Rivera
          Marcelo Rivera
          Martin Santangelo
          Martin Santangelo
          Rami Albatal
          Rami Albatal
          Emiliano Balbuena
          Emiliano Balbuena
          This is a Work in Progress

          Deletes source branch

          You can merge this merge request manually using the
          • Discussion 2
          • Commits 6
          • Pipelines 2
          • Changes 27
          0/2 threads resolved
          • Loading...
          • Brian Hatchet :speech_balloon: @brianhatchet changed milestone to %sprint: Kilted Koala 15 hours ago

            changed milestone to %sprint: Kilted Koala

          • Brian Hatchet :speech_balloon: @brianhatchet added Squad::Green scoped label 15 hours ago

            added Squad::Green scoped label

          • Brian Hatchet :speech_balloon: @brianhatchet added 19 commits 2 hours ago

            added 19 commits

            • a362a518 - [Sprint/HipsterHedgehog] (fix): update thumbnails in activities
            • 4f0eea59 - Merge branch 'fix/update-thumbnails-in-activities' into 'master'
            • b14691c5 - [Sprint/GiddyGiraffe] (feat): ability for channels to self-declare nsfw
            • b50c93d2 - Merge branch 'feat/self-declare-nsfw' into 'master'
            • 84da7d65 - Sprint/JollyJellyfish: Filtering banned and deleted channels
            • ef53036e - Merge branch 'fix/banned-suggested-channels-381' into 'master'
            • f0a0a925 - Fixed forgot password validation
            • 83d701b4 - Merge branch 'forgot-password-validation-fix-560' into 'master'
            • bbf41c60 - [Sprint/CleverChipmunk] (feat): ability to disable group conversations
            • 5845f667 - Merge branch 'feat/disable-group-convos' into 'master'
            • 14927878 - [Sprint/KiltedKoala] (fix): groups conversations issue
            • 07015d77 - Merge branch 'fix/groups-conversation-issue' into 'master'
            • dffd0a4e - (feat): introduce new mwa endpoint for pageview recording
            • d14ac69a - (chore): change boost existing check to include approved too
            • e0140852 - (revert): d14ac69a -> also includes revoked and completed"
            • 3b7aafa9 - (chore): reduce boost offset to 2.5 minutes
            • c5d27f85 - (fix): comment on reminds should not go to remind_object
            • 9bd4d314 - (fix): correct labels for gitlab runners
            • 526aae86 - Merge remote-tracking branch 'origin/master' into feature/permissions-rbac-600

            Compare with previous version

            Toggle commit list
          • Mark Harding
            Mark Harding @markeharding started a thread on the diff 1 minute ago
            Core/Permissions/Permissions.php
            71 }
            72 if ($this->isBanned) {
            73 $role = $this->roles->getRole(Roles::ROLE_BANNED);
            74 }
            75
            76 return $role;
            77 }
            78
            79 private function getChannelRole(User $channel)
            80 {
            81 error_log("Getting channel role");
            82 $this->channels[$channel->guid] = $channel;
            83 if($channel->guid === $this->user->guid) {
            84 return $this->roles->getRole(Roles::ROLE_CHANNEL_OWNER);
            85 }
            86 if ($this->user->isSubscribed($owner->guid)) {
            • Mark Harding
              Mark Harding @markeharding · 1 minute ago
              Owner

              Is it possible to cache in the future?

            • Please register or sign in to reply
          • Mark Harding
            Mark Harding @markeharding started a thread on the diff 1 minute ago
            Core/Permissions/Permissions.php
            68 //Apply global overrides
            69 if ($this->isAdmin) {
            70 $role = $this->roles->getRole(Roles::ROLE_ADMIN);
            71 }
            72 if ($this->isBanned) {
            73 $role = $this->roles->getRole(Roles::ROLE_BANNED);
            74 }
            75
            76 return $role;
            77 }
            78
            79 private function getChannelRole(User $channel)
            80 {
            81 error_log("Getting channel role");
            82 $this->channels[$channel->guid] = $channel;
            83 if($channel->guid === $this->user->guid) {
            • Mark Harding
              Mark Harding @markeharding · 1 minute ago
              Owner

              using ->getGuid() would be ideal.

            • Please register or sign in to reply
          • You're only seeing other activity in the feed. To add a comment, switch to one of the following options.
          Please register or sign in to reply
          Assignee
          Brian Hatchet's avatar Brian Hatchet @brianhatchet
          Assign to
          sprint: Kilted Koala
          Milestone
          sprint: Kilted Koala
          Assign milestone
          None
          Time tracking
          No estimate or time spent
          1
          Labels
          Squad::Green
          Assign labels
          • View project labels
          Lock merge request
          Unlocked
          7
          7 participants
          user avatar
          Ben Hayward
          user avatar
          Marcelo Rivera
          user avatar
          Martin Santangelo
          user avatar
          Rami Albatal
          user avatar
          Emiliano Balbuena
          user avatar
          Mark Harding
          user avatar
          Brian Hatchet
          Reference: minds/engine!290