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
Starpaul20 opened this issue Jul 8, 2014 · 11 comments
Closed

Force login #906

Starpaul20 opened this issue Jul 8, 2014 · 11 comments
Assignees
Labels
b:1.8 s:resolved t:feature
Milestone

Comments

@Starpaul20
Copy link
Member

Starpaul20 commented Jul 8, 2014

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

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

Eldenroot commented Jul 8, 2014

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

@Starpaul20
Copy link
Member Author

Starpaul20 commented Jul 8, 2014

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

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

Starpaul20 commented Jul 8, 2014

Done.

@Eldenroot
Copy link
Contributor

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

@Destroy666x
Copy link
Contributor

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 commented Jul 8, 2014

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

@Sama34
Copy link
Contributor

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 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 commented Jul 18, 2014

@PaulBender

@DiogoParrinha
Copy link
Contributor

DiogoParrinha commented Jul 18, 2014

Also, this seems to work fine for me.

@Sama34
Copy link
Contributor

Sama34 commented Jul 19, 2014

Yes, it does works.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
b:1.8 s:resolved t:feature
Projects
None yet
Development

No branches or pull requests

5 participants