Page 1 of 1

Limit User Access to specific Folders

PostPosted: Mon Oct 03, 2011 5:20 pm
by npinto59
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:

Re: Limit User Access to specific Folders

PostPosted: Mon Oct 03, 2011 7:51 pm
by rectifiercc
Apparently this is not implemented at this time. I would love this feature too.

Re: Limit User Access to specific Folders

PostPosted: Wed Oct 05, 2011 11:50 am
by califrag
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>