Jump to content

Edit the CSS via the branding.xml file


Go to solution Solved by Happy2Play,

Recommended Posts

Posted

Hello,

I would like to know how I can apply changes in the "branding.xml" file so that my CSS is active directly? 

I noticed that when I edit this file it is only taken into account at the next restart. Is it possible to force it or even edit something else? 

Thank you,

arrbee99
Posted

Am probably completely misunderstanding things, and know nowt about Linux, but why not just do your css in the dashboard > Settings box, Save and refresh ?

Posted (edited)

If you must know everything, I would like to prevent my users from being able to download content between certain hours. In the busy hours my connection can have some trouble, or be quickly limited.

So I would like to set up a crontab on Linux that will edit my branding.xml file by performing a search that replaces this:

/* [data-id="download"] {display: none !important;} */

by this:

[data-id="download"] {display: none !important;}

I could indeed do it another way (limitation on the router, limitation on the reverse proxy) but I found this was the easiest way to do it, if the file was taken into account live.  

Edited by Thuzad
arrbee99
Posted

Oh I see. That, like much else, is way beyond me. Sorry bout that.

  • Like 1
  • Solution
Happy2Play
Posted

To my knowledge it will not work as the branding.xml is loaded at startup, editing it directly while running does not reload.  But not entirely sure how editing via the UI does a refresh though.

Debug logging shows "/System/Configuration/branding" on save to reload the branding.xml but am not seeing that endpoint in the api.

Depending on how many users you are talking about you could make api calls for each user to update their policy to disable/enable downloading,

  • Thanks 1
Posted

Ok thanks for this information, indeed I had not thought about the API, I already have a script to modify all my users. I will use it to block downloads.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...