So I'm working with a client and they want me to change some styling in the umbraco admin based on the user type. So the easiest way I thought of doing this was to run some code in an angularJS controller so I could easily determine the logged in user type and do the necessary styling.
I know how to always include styles using the package.manifest in an App_Plugins folder but I can't seem to get angularJS module to do the same.
Perhaps this is my lack of expertise with angularJS or how umbraco is loading the App_Plugins.
If someone could help me figure out how to run some code, on every page load in the Umbraco Admin I would be very appreciative.
Thanks, Tim. This blog post helped me understand some of the ways I could hook into the angularJS pipeline; however, I'm having difficulty understanding the best way to do what I am trying to do.
So the full story is I would like to "hide" the nav/tree section of the page if the user account is not an "admin".
So far I have these steps running in an "module.run" function:
get the current user using the authResource
check the userType
use appState.setGlobalState("showNavigation", true/false)
It appears that the appState.setGlobalState is not working as expected. I looked in the code in github to find this appears to be how you are setting the "table/mobile" view and removing the tree navigation area.
Always run some AngularJS Code in Umbraco Admin
So I'm working with a client and they want me to change some styling in the umbraco admin based on the user type. So the easiest way I thought of doing this was to run some code in an angularJS controller so I could easily determine the logged in user type and do the necessary styling.
I know how to always include styles using the package.manifest in an App_Plugins folder but I can't seem to get angularJS module to do the same.
Perhaps this is my lack of expertise with angularJS or how umbraco is loading the App_Plugins.
If someone could help me figure out how to run some code, on every page load in the Umbraco Admin I would be very appreciative.
Comment author was deleted
Hey Paul,
This post might offer some help on the issue http://24days.in/umbraco/2015/umbraco-7-back-office-tweaks/
Thanks, Tim, I will check this out.
Thanks, Tim. This blog post helped me understand some of the ways I could hook into the angularJS pipeline; however, I'm having difficulty understanding the best way to do what I am trying to do.
So the full story is I would like to "hide" the nav/tree section of the page if the user account is not an "admin".
So far I have these steps running in an "module.run" function:
It appears that the appState.setGlobalState is not working as expected. I looked in the code in github to find this appears to be how you are setting the "table/mobile" view and removing the tree navigation area.
Is there a better way to do this?
Thanks!
is working on a reply...