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.

Restricting access not ot forum, but to single topics

2 posters

Go down

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?
Kami-sama
Kami-sama
Forumember

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

http://hogas.huhohi.com/

Back to top Go down

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.
SLGray
SLGray
Administrator
Administrator

Male Posts : 51555
Reputation : 3524
Language : English
Location : United States

https://forumsclub.com/gc/128-link-directory/

Back to top Go down

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)
Kami-sama
Kami-sama
Forumember

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

http://hogas.huhohi.com/

Back to top Go down

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.
SLGray
SLGray
Administrator
Administrator

Male Posts : 51555
Reputation : 3524
Language : English
Location : United States

https://forumsclub.com/gc/128-link-directory/

Back to top Go down

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.
avatar
Guest
Guest


Back to top Go down

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum