From: Chris Date: Tue, 18 Mar 2014 13:44:58 +0000 (+0800) Subject: GroupCountries.php X-Git-Url: http://git.roojs.org/?p=Pman.Core;a=commitdiff_plain;h=ba87a4e7de05bc2b77cc3ed77502d3b87b4b0fd5 GroupCountries.php --- diff --git a/GroupCountries.php b/GroupCountries.php index e22a0e28..fbdc6912 100644 --- a/GroupCountries.php +++ b/GroupCountries.php @@ -11,6 +11,25 @@ class Pman_Core_GroupCountries extends Pman { //put your code here - + function getAuth() { + parent::getAuth(); // load company! + $au = $this->getAuthUser(); + if (!$au) { + $this->jerr("Not authenticated", array('authFailure' => true)); + } + if ($au->company()->comptype != 'OWNER') { + $this->jerr("Permission Denied" ); + } + $this->authUser = $au; + return true; + } + function get() + { + $this->post(); + } + function post() + { + + } }