EtchUK / Etch.OrchardCore.ContentPermissions

Module for Orchard Core to enable configuring access at a content item level.
MIT License
25 stars 6 forks source link

Moved CanAccess and GetSettings to Service #4

Closed dalenewman closed 4 years ago

dalenewman commented 4 years ago

In order to enforce content item security in my module's custom controllers, I needed a service I could register and use. I could of just made it in my module but I thought it could be useful to others.

peterkeating commented 4 years ago

@dalenewman Thank you for this awesome change! Can see the benefits of overriding the authentication logic from another module so refactoring the logic to be in a service is a great update!

I've done some minor tweaks to the commit within this PR to follow the same code formatting, remove unused variables, ordering of constructor args (alphabetically), removed the version number update (will do that in a separate commit) and tweak the commit message to follow the pattern we typically use (https://chris.beams.io/posts/git-commit/).