Page 1 of 1

[Accepted] Folder Whitelisting

Posted: Mon Oct 21, 2013 4:12 pm
by fhaq
I'm putting in a suggestion for folder white listing. ie This ip xxx.xxx.xxx.xx1 receives all folders while xxx.xxx.xxx.xx2 only receives folders kids_shows, cartoons, pg13_movies, ect. (unless anyone has a way to already do this). Lets face it, the kids don't need access to all the media.

[Suggestion] Folder Whitelisting

Posted: Mon Oct 21, 2013 4:20 pm
by DeFlanko
Honestly its a good idea as i have a little one on the way and the only other way i can think of doing this would be to run two instances of UMS (but then they would be named the same and it might be conflicting).

I would call this something like Content filtering based on your folder selection to a media renderer or IP.
:thumbup:

Re: Folder White listing

Posted: Mon Oct 21, 2013 7:22 pm
by SharkHunter
I had mad something close to this way back in some old SHB release. In Channels I even added pin-code on various folders. The drawback there is a) punching in codes using the remote sucks b) once unlocked it's unlocked.

Re: Folder White listing

Posted: Tue Oct 22, 2013 10:58 am
by DeFlanko
SharkHunter wrote:I had mad something close to this way back in some old SHB release. In Channels I even added pin-code on various folders. The drawback there is a) punching in codes using the remote sucks b) once unlocked it's unlocked.
There is no way to code in a timer after so many minutes reactivate?

Re: Folder White listing

Posted: Wed Oct 23, 2013 12:04 am
by SharkHunter
Everything is possible. I'll try and readd this functionality.

Re: Folder White listing

Posted: Wed Oct 23, 2013 11:03 am
by DeFlanko
Thank you sir!

Re: [Accepted] Folder Whitelisting

Posted: Wed Oct 23, 2013 11:00 pm
by SharkHunter
I've added this here https://github.com/UniversalMediaServer ... 8b5b109b23.
A small note on how it wroks.

To your UMS.conf (currently no GUI options) you add lines of format
tag.option = value
where tag is either an IP address or a render name. The render name should with spaces changed to _ instead.
The option is one of
  • folders
  • vfolders
  • plugins
  • web
  • recent
  • new_media
  • hide_set
The value is option dependent. The last 4 are boolean values. for folders and vfolders it is a list of folders. for plugins it's a list of allowed plugins

Example

folders =
hide_video_settings = false
192.168.1.1.folders = c:\\child_safe
192.168.1.1.plugins = SafePlugin
192.168.1.1.hide_set = true
192.168.1.1.recent = true

This will for IP address 192.168.1.1:
1) Share the folder c:\child_safe
2) Only allow it to use plugin SafePlugin
3) Hide the Server Settings folder
4) Hide the Recently played list

All other renders will use the "global" settings ie. see all folders, and the ServerSettings and all Plugins.

Note that the plugin list (a comma separated list) is which plugins are ALLOWED and case sensitive. To allow all plugins except on you have to list all except the one that shouldn't be there
(If you have plugins A,B,C,D and want to allow access to A,C,D the add 192.168.1.1.plugins = A,C,D).

If an option is not present it will fallback to the "global" config or if that isn't present to the default value..

Re: [Accepted] Folder Whitelisting

Posted: Tue Nov 19, 2013 2:50 am
by SharkHunter
This feature is now added to 3.1.0. There is no GUI option (since it is to complicated for that) so you'll need to add the stuff to your UMS.conf. As an extra twist you can add a file called UMS.deny to the same dir as your UMS.conf and to that file add add
tag.[name|file|sys]=regex
For each folder/file that should be added UMS will apply the regexp to the name,filename or system name and if the regexp matches the folder/file will NOT be added.
For example
192.168.1.1.name=*.private.*
will remove all folders/files which has the word private in it.
192.168.1.1.file=c:\\tst.*
will remove all files that have c:\tst in there path
etc.

If no rule in the deny file matches the file/folder is added.