Restricting access not ot forum, but to single topics Hitskin_logo Hitskin.com

This is a Hitskin.com skin preview
Install the skinReturn to the skin page

The forum of the forums
Would you like to react to this message? Create an account in a few clicks or log in to continue.
2 posters

    Restricting access not ot forum, but to single topics

    Kami-sama
    Kami-sama
    Forumember


    Female Posts : 407
    Reputation : 12
    Language : EN, RU, DE, LT
    Location : Lithuania

    In progress Restricting access not ot forum, but to single topics

    Post by Kami-sama August 25th 2017, 6:08 pm

    Hello!

    So this is straight forward. Currently we can manage access by forums.
    Is there a way to allow only specific member group users to access specific topic?
    SLGray
    SLGray
    Administrator
    Administrator


    Male Posts : 51498
    Reputation : 3523
    Language : English
    Location : United States

    In progress Re: Restricting access not ot forum, but to single topics

    Post by SLGray August 25th 2017, 6:55 pm

    There are not permissions for individual topics, only for forums.  So if you want group A to only see a certain topic or topics, you will have to create a forum that only that group can see.



    Restricting access not ot forum, but to single topics Slgray10

    When your topic has been solved, ensure you mark the topic solved.
    Never post your email in public.
    Kami-sama
    Kami-sama
    Forumember


    Female Posts : 407
    Reputation : 12
    Language : EN, RU, DE, LT
    Location : Lithuania

    In progress Re: Restricting access not ot forum, but to single topics

    Post by Kami-sama August 25th 2017, 7:09 pm

    Is there a way to redirect users page based on the group the user belongs to?
    Basically, I know how to redirect. My question would be, how to take users group as a variable?
    Also, would that work if user belongs to multiple groups.
    (using javascript)
    SLGray
    SLGray
    Administrator
    Administrator


    Male Posts : 51498
    Reputation : 3523
    Language : English
    Location : United States

    In progress Re: Restricting access not ot forum, but to single topics

    Post by SLGray August 25th 2017, 7:30 pm

    It depends on the order of the groups.  If a members is in 3 groups, the group that comes first will give that member the permissions of that group.



    Restricting access not ot forum, but to single topics Slgray10

    When your topic has been solved, ensure you mark the topic solved.
    Never post your email in public.
    avatar
    Guest
    Guest


    In progress Re: Restricting access not ot forum, but to single topics

    Post by Guest August 25th 2017, 9:40 pm

    If you want to have the group as a js variable, you'll have to send a get request to the groups page and use the information sent back by the server. Something like this:
    Code:
    $(function(){
    $.get("/groups", function(data){
    /*Codes here*/
    })
    })
    In the callback, the variable data contains the html of the groups page. You can use it that way:
    Code:
    $(element, data).last()
    Element is the selector of the element holding the groups the user belongs to.