Added IPermissionDefinitionService for Abstractions Project#5841
Added IPermissionDefinitionService for Abstractions Project#5841valadas merged 5 commits intodnnsoftware:developfrom
Conversation
valadas
left a comment
There was a problem hiding this comment.
Nothing sticks out to me. Just no in love with IPermissionInfoBase name which makes it look like a base class. What about we use IPermission and IPermissionInfo instead of IPermissionInfo and IPermissionInfoBase ? Just a thought...
|
The only downside to IPermission is that it's an already existing interface in .NET Framework: System.Security.IPermission. We can also merge the two interfaces to a single interface |
|
Sounds good. Hey what tool you use for that graph ? |
DNN Platform/Library/Security/Permissions/PermissionController.cs
Outdated
Show resolved
Hide resolved
DNN Platform/Library/Security/Permissions/PermissionController.cs
Outdated
Show resolved
Hide resolved
|
I agree, let's merge |
|
Sadly, I couldn't merge PermissionInfo is from I've renamed Is this OK? |
|
Sounds great to me, thanks! |
2d18572 to
94327db
Compare
valadas
left a comment
There was a problem hiding this comment.
Nice, given this is the resource manager and not part of any distributed nuget package I am not worried about the breaking changes in this.
|
I've checked |
|
I'm still thinking about the interface name. If we're gonna make abstractions for Another solution is to rename this interface to |
I think |
|
There are still 2 comments open: #5841 (comment), #5841 (comment); other than that everything is done. |
|
Thanks @GerardSmit, this is looking great. The @dnnsoftware/approvers will meet next Tuesday, so we may not get a definitive answer on those open questions until then. We appreciate your contribution and your patience. |
Fixes dnnsoftware#5840 Co-authored-by: Brian Dukes <bdukes@engagesoftware.com>
Dnn.Modules.ResourceManager has TreatWarningsAsErrors enabled
397ffaf to
83a6890
Compare
|
@dnnsoftware/approvers I've rebased on |




Fixes #5840
Summary
This PR adds
IPermissionDefinitionServicewhich is an abstraction layer forPermissionController.Instead of returning an ArrayList in the
GetPermissions*-methods, I've made the return typeIEnumerable<IPermissionInfo>; this reduces allocations (ArrayList instance and two arrays). For all these methods I've created an Enumerable method, that's being used by the current implementation and interface implementation; this is so we don't have duplicated code.I've only created an interface for this class. All calls to the PermissionController haven't been refactored.
TODO
IPermissionInfoBaseandIPermissionInfointo a single interfaceIPermissionInfo