Skip to content
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

Merged

Conversation

valadas
Copy link
Contributor

@valadas 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.

@valadas valadas changed the base branch from develop to feature/resource-manager September 7, 2020 19:22
@valadas valadas requested a review from bdukes September 7, 2020 19:22
@valadas valadas added this to the Future: Minor milestone Sep 7, 2020
Copy link
Contributor

@david-poindexter david-poindexter left a 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! 🎉

valadas and others added 2 commits September 7, 2020 15:50
…ceManager.resx

Co-authored-by: David Poindexter <dpoindexter@nvisionative.com>
…ceManager.resx

Co-authored-by: David Poindexter <dpoindexter@nvisionative.com>
Copy link
Contributor

@SkyeHoefling SkyeHoefling left a 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


if (!this.UserInfo.IsSuperUser && !this.UserInfo.IsInRole(this.PortalSettings.AdministratorRoleName))
{
this.Response.Redirect(Globals.AccessDeniedURL(), true);
Copy link
Contributor

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?

Copy link
Contributor Author

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

Copy link
Contributor

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 the Globals.AccessDeniedURL() code
  • Update the Globals.AccessDeniedURL() to use the INavigationManager 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.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ha, I understand now :)

Copy link
Contributor

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>
@valadas
Copy link
Contributor Author

valadas commented Sep 8, 2020

Thank you @ahoefling
I will look into all that in more details a bit later today.

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...

@valadas
Copy link
Contributor Author

valadas commented Sep 8, 2020

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 valadas merged commit fb82726 into dnnsoftware:feature/resource-manager Sep 8, 2020
@bdukes
Copy link
Contributor

bdukes commented Sep 8, 2020

@valadas In Visual Studio, copy the stylecop.json file from an existing project into this new project. It should show up in the project file as a link, rather than an entirely new file (there's only one stylecop.json file, and all of the projects reference it)

@valadas valadas modified the milestones: Future: Minor, 9.8.0 Oct 15, 2020
@valadas valadas deleted the fm-folder-providers branch April 14, 2022 21:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants