Instead of reading out permissions from various roles (and thus potentially introducing a security risk), we should prepare Group for a centralized permission system. Step three would be to introduce a service that checks someone's permissions based on the calculated permissions (service introduced here: #3028340: Create a central service that calculates someone's group permissions).

Comments

kristiaanvandeneynde created an issue. See original summary.

kristiaanvandeneynde’s picture

StatusFileSize
new13.1 KB

Do not test yet until other issues land.

Consider changing the @todo about Group vs Group ID since both current implementations could easily pass an ID. Although it is kind of ugly to ask for an account object and then a group ID (not object), it could improve performance by not having to load a membership's group. And you can only load a membership with a fully loaded group anyhow. So maybe remove the @todo and leave the code as is.

kristiaanvandeneynde’s picture

Title: [PP-2] Create a central service that checks someone's group permissions » Create a central service that checks someone's group permissions
Status: Needs work » Needs review
StatusFileSize
new13.54 KB

Parent issue landed, let's do this.

  • Added service declaration, which I forgot earlier
  • Removed @todo, if it's a performance hog, then we need to fix this in way more places and break BC all over the place (so 8.2.0)

kristiaanvandeneynde’s picture

Status: Needs review » Fixed

All aboard the green train.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.