🧲 New features Custom user role permissions Employee edit form updated Employee daily task list Attendance and employee distribution charts on dashboard Improvements to company structure and company assets module Improved tables for displaying data in several modules Faster data loading (specially for employee module) Initials based profile pictures Re-designed login page Re-designed user profile page Improvements to filtering New REST endpoints for employee qualifications 🐛 Bug fixes Fixed, issue with managers being able to create performance reviews for employees who are not their direct reports Fixed, issues related to using full profile image instead of using smaller version of profile image Changing third gender to other Improvements and fixes for internal frontend data caching
58 lines
1.4 KiB
PHP
58 lines
1.4 KiB
PHP
<?php
|
|
/**
|
|
* Created by PhpStorm.
|
|
* User: Thilina
|
|
* Date: 8/19/17
|
|
* Time: 3:00 PM
|
|
*/
|
|
|
|
namespace Metadata\Common\Model;
|
|
|
|
use Classes\ModuleAccess;
|
|
use Classes\SettingsManager;
|
|
use Model\BaseModel;
|
|
|
|
class Country extends BaseModel
|
|
{
|
|
public $table = 'Country';
|
|
|
|
public function getAdminAccess()
|
|
{
|
|
return array("get","element","save","delete");
|
|
}
|
|
|
|
public function getAnonymousAccess()
|
|
{
|
|
return array("get","element");
|
|
}
|
|
|
|
// @codingStandardsIgnoreStart
|
|
public function Find($whereOrderBy, $bindarr = false, $cache = false, $pkeysArr = false, $extra = array())
|
|
{
|
|
$allowedCountriesStr = SettingsManager::getInstance()->getSetting('System: Allowed Countries');
|
|
$allowedCountries = array();
|
|
if (!empty($allowedCountriesStr)) {
|
|
$allowedCountries = json_decode($allowedCountriesStr, true);
|
|
}
|
|
|
|
if (!empty($allowedCountries)) {
|
|
$res = parent::Find("id in (".implode(",", $allowedCountries).")", array());
|
|
if (empty($res)) {
|
|
SettingsManager::getInstance()->setSetting('System: Allowed Countries', '');
|
|
} else {
|
|
return $res;
|
|
}
|
|
}
|
|
|
|
return parent::Find($whereOrderBy, $bindarr, $pkeysArr, $extra);
|
|
}
|
|
// @codingStandardsIgnoreEnd
|
|
|
|
public function getModuleAccess()
|
|
{
|
|
return [
|
|
new ModuleAccess('metadata', 'admin'),
|
|
];
|
|
}
|
|
}
|