Skip to content

Commit

Permalink
(captive portal) add group enforcement, closes #1377
Browse files Browse the repository at this point in the history
  • Loading branch information
AdSchellevis committed Feb 7, 2017
1 parent 0d104a9 commit a7ef419
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,11 @@ public function logonAction($zoneid = 0)
$this->request->getPost("password", "string")
);

// check group when group enforcement is set
if ($isAuthenticated && (string)$cpZone->authEnforceGroup != "") {
$isAuthenticated = $authServer->groupAllowed($userName, $cpZone->authEnforceGroup);
}

if ($isAuthenticated) {
// stop trying, when authenticated
break;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,12 @@
<style>tokenize</style>
<help><![CDATA[Select authentication methods to use, leave empty for no authentication needed.]]></help>
</field>
<field>
<id>zone.authEnforceGroup</id>
<label>Enforce local group</label>
<type>dropdown</type>
<help><![CDATA[Restrict access to users in the selected (local)group.]]></help>
</field>
<field>
<id>zone.idletimeout</id>
<label>Idle timeout (minutes)</label>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@
<multiple>Y</multiple>
<default>Local Database</default>
</authservers>
<authEnforceGroup type="AuthGroupField">
<Required>N</Required>
</authEnforceGroup>
<idletimeout type="IntegerField">
<Required>Y</Required>
<Default>0</Default>
Expand Down

0 comments on commit a7ef419

Please sign in to comment.