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

Question: Can this module also be used to set content item level permissions by code? #7

Closed TheShihan closed 4 years ago

TheShihan commented 4 years ago

Can this module also be used to set content item level permissions by code? Or is this something that would still be needed to be done manually by an administrator? Or maybe setting item level permissions by code is possible regardless of this module but this module will make sure that such permissions work on the content items?

peterkeating commented 4 years ago

What kind of code are you thinking of writing? If you're writing code then it's likely you're creating a custom module that wouldn't require a dependency on this module. This module enables you to do it without requiring code and can be controlled by administrators within the CMS. By all means use the same code that we're using the validate whether a user has permission to access a content item though - https://github.com/EtchUK/Etch.OrchardCore.ContentPermissions/blob/master/Services/ContentPermissionsService.cs#L36