本文整理汇总了PHP中thebuggenie\core\framework\Settings::isPermissive方法的典型用法代码示例。如果您正苦于以下问题:PHP Settings::isPermissive方法的具体用法?PHP Settings::isPermissive怎么用?PHP Settings::isPermissive使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类thebuggenie\core\framework\Settings
的用法示例。
在下文中一共展示了Settings::isPermissive方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: canCreatePublicSearches
/**
* Return if the user can create public saved searches
*
* @return boolean
*/
public function canCreatePublicSearches()
{
return $this->_dualPermissionsCheck('cancreatepublicsearches', 0, 'canfindissuesandsavesearches', 0, framework\Settings::isPermissive());
}
示例2: canUserSet
public function canUserSet(\thebuggenie\core\entities\User $user)
{
$retval = $user->hasPermission($this->getPermissionsKey(), $this->getID(), 'core');
$retval = $retval === null ? $user->hasPermission($this->getPermissionsKey(), 0, 'core') : $retval;
return $retval !== null ? $retval : \thebuggenie\core\framework\Settings::isPermissive();
}
示例3: _dualPermissionsCheck
protected function _dualPermissionsCheck($permission_1, $permission_2, $fallback = null)
{
$retval = $this->permissionCheck($permission_1);
$retval = $retval === null ? $this->permissionCheck($permission_2) : $retval;
if ($retval !== null) {
return $retval;
} else {
return $fallback !== null ? $fallback : framework\Settings::isPermissive();
}
}
示例4: image_tag
if (is_bool($val)) {
?>
<?php
$image_tag = $val ? image_tag('permission_set_ok.png') : image_tag('permission_set_denied.png');
?>
<?php
} elseif ($mode == 'datatype') {
?>
<?php
$image_tag = image_tag('permission_unset_ok.png');
?>
<?php
} elseif ($mode == 'general' && $type == 'everyone') {
?>
<?php
$image_tag = \thebuggenie\core\framework\Settings::isPermissive() ? image_tag('permission_unset_ok.png') : image_tag('permission_unset_denied.png');
?>
<?php
} elseif ($mode == 'configuration' && $type == 'everyone') {
?>
<?php
$image_tag = image_tag('permission_unset_denied.png');
?>
<?php
} elseif ($mode == 'pages' && $type == 'everyone') {
?>
<?php
$image_tag = image_tag('permission_unset_ok.png');
?>
<?php
} elseif ($mode == 'user' && $type == 'everyone') {
示例5: _canPermissionsOrExtraInformation
protected function _canPermissionsOrExtraInformation($permission)
{
if (isset($this->_can_permission_cache[$permission])) {
return $this->_can_permission_cache[$permission];
}
$retval = $this->_permissionCheck($permission);
$retval = $retval === null ? $this->canAddExtraInformation() : $retval;
$this->_can_permission_cache[$permission] = $retval;
return $retval !== null ? $retval : \thebuggenie\core\framework\Settings::isPermissive();
}
示例6: canUserDeleteOwnComment
/**
* Return if the user can delete own comment
*
* @return boolean
*/
public function canUserDeleteOwnComment()
{
$retval = $this->_canPermissionOrSeeAndEditComments('candeletecommentsown');
return $retval !== null ? $retval : framework\Settings::isPermissive();
}
示例7: __
disabled<?php
}
?>
>
<option value=1<?php
if (\thebuggenie\core\framework\Settings::isPermissive()) {
?>
selected<?php
}
?>
><?php
echo __('Permissive');
?>
</option>
<option value=0<?php
if (!\thebuggenie\core\framework\Settings::isPermissive()) {
?>
selected<?php
}
?>
><?php
echo __('Restrictive');
?>
</option>
</select>
<?php
echo config_explanation(__("%restrictive: With this security policy, users don't automatically get access to projects, modules, etc., but must be granted access specifically.", array('%restrictive' => '<b>' . __('Restrictive') . '</b>')) . "<br>" . __("%permissive: This security policy assume you have access to things like projects, pages, etc.", array('%permissive' => '<b>' . __('Permissive') . '</b>')) . "<br><br>" . __("If you're running a public tracker, or a tracker with several projects you probably want to use a restrictive security policy - however, with smaller teams or and simpler projects, permissive security policy will be most efficient.") . "<br><br><i>" . __("Some permissions, such as configuration access are not affected by this setting, but must always be explicitly defined") . "</i>");
?>
</td>
</tr>