Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Force login #906

Closed
PaulBender opened this issue Jul 8, 2014 · 11 comments
Closed

Force login #906

PaulBender opened this issue Jul 8, 2014 · 11 comments
Assignees
Milestone

Comments

@PaulBender
Copy link
Member

@PaulBender PaulBender commented Jul 8, 2014

Add a setting that allows Admins to force a user to register/login in order to view the board.

@PaulBender PaulBender added this to the 1.8 Beta 3 milestone Jul 8, 2014
@PaulBender PaulBender self-assigned this Jul 8, 2014
@Eldenroot
Copy link
Contributor

@Eldenroot Eldenroot commented Jul 8, 2014

could be implemented for only specific forum or category as well?

@PaulBender
Copy link
Member Author

@PaulBender PaulBender commented Jul 8, 2014

No, this is meant to be a board wide setting.

PaulBender added a commit that referenced this issue Jul 8, 2014
@PaulBender
Copy link
Member Author

@PaulBender PaulBender commented Jul 8, 2014

Done.

@Eldenroot
Copy link
Contributor

@Eldenroot Eldenroot commented Jul 8, 2014

Ohh, I see. bad, because now you cannot force user to login/register for view specific forum - this feature has phpBB for example... you can only set password

@PaulBender PaulBender added the fixed label Jul 8, 2014
@Destroy666x
Copy link
Contributor

@Destroy666x Destroy666x commented Jul 8, 2014

@Cu8eR, that's already possible since 1.6 or even earlier.. Just change Forum Permissions.

@Eldenroot
Copy link
Contributor

@Eldenroot Eldenroot commented Jul 8, 2014

@Destroy666x - OK, I have to find this option, sorry if I am wrong

@Sama34
Copy link
Contributor

@Sama34 Sama34 commented Jul 10, 2014

Just found this:

if($mybb->usergroup['canview'] != 1)
{
    // Check pages allowable even when not allowed to view board
    if(defined('ALLOWABLE_PAGE'))
    {
        if(is_string(ALLOWABLE_PAGE))
        {
            $allowable_actions = explode(',', ALLOWABLE_PAGE);
            if(!in_array($mybb->get_input('action'), $allowable_actions))
            {
                error_no_permission();
            }

            unset($allowable_actions);
        }
        else if(ALLOWABLE_PAGE !== 1)
        {
            error_no_permission();
        }
    }
    else
    {
        error_no_permission();
    }
}

Is not that enough?

@Destroy666x
Copy link
Contributor

@Destroy666x Destroy666x commented Jul 10, 2014

@Sama34, I thought it can be done with current usergroup permissions too.

No for "Can view board?" in Guests group permissions works just fine for me in 1.6. So it seems to be a duplicate.

@DiogoParrinha
Copy link
Contributor

@DiogoParrinha DiogoParrinha commented Jul 18, 2014

@DiogoParrinha
Copy link
Contributor

@DiogoParrinha DiogoParrinha commented Jul 18, 2014

Also, this seems to work fine for me.

@Sama34
Copy link
Contributor

@Sama34 Sama34 commented Jul 19, 2014

Yes, it does works.

@Sama34 Sama34 closed this Jul 19, 2014
@DiogoParrinha DiogoParrinha added feature and removed enhancement labels Jul 21, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
5 participants
You can’t perform that action at this time.