Limit User Access to specific Folders

General discussions.

Moderator: moderators

Limit User Access to specific Folders

Postby npinto59 » Mon Oct 03, 2011 5:20 pm

I've just spent the better part of an hour reading through the forums and I can't seem to find what I need, so here goes a post. I'd like to limit certain users to access only certain folders within Subsonic. A couple of examples would be 1) the ROKU I only want to use for video streaming and i don't want my 20k + songs showing up. 2) The grandparents would like access to my videos folder but don't need to see my music 3) Friends would like to listen to music but I would prefer they didn't access my videos.
At present i have everything in 2 master folders: MUSIC & VIDEO. What is the nest way too give a user access to one of these and not the other? All help is greatly appreciated. :lol:
npinto59
 
Posts: 2
Joined: Mon Oct 03, 2011 4:41 pm

Re: Limit User Access to specific Folders

Postby rectifiercc » Mon Oct 03, 2011 7:51 pm

Apparently this is not implemented at this time. I would love this feature too.
rectifiercc
 
Posts: 14
Joined: Tue Dec 21, 2010 11:20 pm

Re: Limit User Access to specific Folders

Postby califrag » Wed Oct 05, 2011 11:50 am

npinto59 wrote:I've just spent the better part of an hour reading through the forums and I can't seem to find what I need, so here goes a post. I'd like to limit certain users to access only certain folders within Subsonic. A couple of examples would be 1) the ROKU I only want to use for video streaming and i don't want my 20k + songs showing up. 2) The grandparents would like access to my videos folder but don't need to see my music 3) Friends would like to listen to music but I would prefer they didn't access my videos.
At present i have everything in 2 master folders: MUSIC & VIDEO. What is the nest way too give a user access to one of these and not the other? All help is greatly appreciated. :lol:



Well... this may or may not work, but you might be able to use if tests and limit the 'musicFolder' select box in the left.jsp

WARNING: PSEUDO-CODE

Code: Select all
<c:if test="${model.user.username eq 'grandma'}">
<script>
document.getElementById("musicFolder").value = "videos";
document.getElementById("musicFolder").disabled = true;
</script>
</c:if>


not sure if this will work though...

You can extend it to be choose statements instead...

Code: Select all
<script type="text/javascript">
<c:choose>
<c:when test="${model.user.username eq 'grandma' || model.username eq 'roku'}">
document.getElementById("musicFolder").value = "videos";
document.getElementById("musicFolder").disabled = true;
</c:when>
<c:when test="${model.user.username eq 'friend'}">
document.getElementById("musicFolder").value = "music";
document.getElementById("musicFolder").disabled = true;
</c:when>
</c:otherwise>
document.getElementById("musicFolder").disabled = false;
</c:otherwise>
</c:choose>
</script>
califrag
 
Posts: 72
Joined: Mon Sep 26, 2011 3:43 am


Return to General

Who is online

Users browsing this forum: No registered users and 12 guests