-
Notifications
You must be signed in to change notification settings - Fork 754
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adds support for folder providers config in new file manager. #4061
Adds support for folder providers config in new file manager. #4061
Conversation
valadas
commented
Sep 7, 2020
- Adds a React control to list and remove folder providers configs
- Hooks into existing webforms settings control to implement 3rd-party configuration UI for each folder provider.
DNN Platform/Modules/ResourceManager/Services/ItemsController.cs
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great work on this @valadas - we are getting closer and closer - woo hoo! 🎉
DNN Platform/Modules/ResourceManager/App_LocalResources/EditFolderMapping.ascx.resx
Show resolved
Hide resolved
DNN Platform/Modules/ResourceManager/App_LocalResources/ResourceManager.resx
Outdated
Show resolved
Hide resolved
DNN Platform/Modules/ResourceManager/App_LocalResources/ResourceManager.resx
Outdated
Show resolved
Hide resolved
…ceManager.resx Co-authored-by: David Poindexter <dpoindexter@nvisionative.com>
…ceManager.resx Co-authored-by: David Poindexter <dpoindexter@nvisionative.com>
DNN Platform/Modules/ResourceManager/App_LocalResources/ResourceManager.resx
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I left a review as @valadas requested. I know I am not a core reviewer, but I thought I would leave some notes across the entire Pull Request. Overall this looks great and thanks for the contribution!
I left a bunch of comments on coding style that will generate build warnings and we should be striving to reduce those as much as possible.
Dependency Injection in DNN is starting to be used in many 3rd party modules. But, there is not enough support for Dependency Injection across the core library making changes like this difficult. My personal approach is identifying tangible pieces to refactor into interfaces and submitting Pull Requests. I believe we have found some pieces, most importantly managing Module Navigation. I don't think it should hold up a PR like this, but this feature won't be ready for v11 as the ModuleControlFactory
is planned for deprecation.
Here are a couple areas in DNN that I identified in this PR that could be good candidates for new abstractions for DI
- ThumbnailManager
- ModuleNavigationManager
- FolderMappingController
DNN Platform/Modules/ResourceManager/Services/ItemsController.cs
Outdated
Show resolved
Hide resolved
DNN Platform/Modules/ResourceManager/Services/ItemsController.cs
Outdated
Show resolved
Hide resolved
|
||
if (!this.UserInfo.IsSuperUser && !this.UserInfo.IsInRole(this.PortalSettings.AdministratorRoleName)) | ||
{ | ||
this.Response.Redirect(Globals.AccessDeniedURL(), true); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could this be added to the NavigationManager
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am not sure what you mean by this ? @ahoefling
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The Dnn NavigationManager
manages several common routing scenarios in DNN. It doesn't include all of them, but is at a great starting point. The Globals.AccessDeniedURL()
really should be ported into the NavigationManager
.
I propose the following changes
- Add new API to
INavigationManager
-AccessDeniedUrl()
- Implement new API in
NavigationManager
by porting theGlobals.AccessDeniedURL()
code - Update the
Globals.AccessDeniedURL()
to use theINavigationManager
new API
This may be a bit to refactor, it is sometimes hard to tell just by looking at the API structure. @bdukes or @mitchelsellers do you have any thoughts on this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ha, I understand now :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, moving more navigation methods to INavigationManager
would be nice. However, we need to be thoughtful that adding members to an interface is a breaking change, since someone may be trying to provide an alternate implementation (at the very least via tests).
…ceManager.resx Co-authored-by: David Poindexter <dpoindexter@nvisionative.com>
Thank you @ahoefling I think we are missing the stylecop config on this project, is it just a matter of copying the stylecop.json file into the project ? I would be happy to rewrite those things to respect the new code rules. The webforms control was a direct copy from the other file manager, I only adjusted a couple of lines for proper urls and removing the telerik dropdown. But this also I would be happy to correct with the new stylecop config in place... I'll correct this PR and then probably submit another one with stylecop in place... |
As discussed on phone, we are merging this to unblock other in progress work on this branch, we will have to re-review the actual whole project anyway later when we merge this into develop. |
@valadas In Visual Studio, copy the |