Force login #906

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

Comments

Projects
None yet
5 participants
@PaulBender
Member

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

This comment has been minimized.

Show comment
Hide comment
@Eldenroot

Eldenroot Jul 8, 2014

Contributor

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

Contributor

Eldenroot commented Jul 8, 2014

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

@PaulBender

This comment has been minimized.

Show comment
Hide comment
@PaulBender

PaulBender Jul 8, 2014

Member

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

Member

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

This comment has been minimized.

Show comment
Hide comment
@PaulBender

PaulBender Jul 8, 2014

Member

Done.

Member

PaulBender commented Jul 8, 2014

Done.

@Eldenroot

This comment has been minimized.

Show comment
Hide comment
@Eldenroot

Eldenroot Jul 8, 2014

Contributor

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

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

@PaulBender PaulBender added the fixed label Jul 8, 2014

@Destroy666x

This comment has been minimized.

Show comment
Hide comment
@Destroy666x

Destroy666x Jul 8, 2014

Contributor

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

Contributor

Destroy666x commented Jul 8, 2014

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

@Eldenroot

This comment has been minimized.

Show comment
Hide comment
@Eldenroot

Eldenroot Jul 8, 2014

Contributor

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

Contributor

Eldenroot commented Jul 8, 2014

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

@Sama34

This comment has been minimized.

Show comment
Hide comment
@Sama34

Sama34 Jul 10, 2014

Contributor

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?

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

This comment has been minimized.

Show comment
Hide comment
@Destroy666x

Destroy666x Jul 10, 2014

Contributor

@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.

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.

@PirataNervo

This comment has been minimized.

Show comment
Hide comment
Contributor

PirataNervo commented Jul 18, 2014

@PirataNervo

This comment has been minimized.

Show comment
Hide comment
@PirataNervo

PirataNervo Jul 18, 2014

Contributor

Also, this seems to work fine for me.

Contributor

PirataNervo commented Jul 18, 2014

Also, this seems to work fine for me.

@Sama34

This comment has been minimized.

Show comment
Hide comment
@Sama34

Sama34 Jul 19, 2014

Contributor

Yes, it does works.

Contributor

Sama34 commented Jul 19, 2014

Yes, it does works.

@Sama34 Sama34 closed this Jul 19, 2014

@PirataNervo PirataNervo 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