当前位置: 首页>>代码示例>>PHP>>正文


PHP SecurityGroup::inherit_creator方法代码示例

本文整理汇总了PHP中SecurityGroup::inherit_creator方法的典型用法代码示例。如果您正苦于以下问题:PHP SecurityGroup::inherit_creator方法的具体用法?PHP SecurityGroup::inherit_creator怎么用?PHP SecurityGroup::inherit_creator使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在SecurityGroup的用法示例。


在下文中一共展示了SecurityGroup::inherit_creator方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: inherit

 function inherit(&$focus, $isUpdate)
 {
     SecurityGroup::assign_default_groups($focus, $isUpdate);
     //this must be first because it does not check for dups
     //don't do inheritance if popup selector method is chosen and a user is making the request...
     if (isset($sugar_config['securitysuite_popup_select']) && $sugar_config['securitysuite_popup_select'] == true && isset($_REQUEST['action']) && $_REQUEST['action'] == 'Save') {
         return;
     }
     SecurityGroup::inherit_creator($focus, $isUpdate);
     SecurityGroup::inherit_assigned($focus, $isUpdate);
     SecurityGroup::inherit_parent($focus, $isUpdate);
 }
开发者ID:sysraj86,项目名称:carnivalcrm,代码行数:12,代码来源:SecurityGroup.php

示例2: inherit

 function inherit(&$focus, $isUpdate)
 {
     global $sugar_config;
     SecurityGroup::assign_default_groups($focus, $isUpdate);
     //this must be first because it does not check for dups
     SecurityGroup::inherit_assigned($focus, $isUpdate);
     SecurityGroup::inherit_parent($focus, $isUpdate);
     //don't do creator inheritance if popup selector method is chosen and a user is making the request...
     //don't if saving from a popup (subpanel_field_name check. Save2 is the action but to be safe use the subpanel check)
     if (isset($sugar_config['securitysuite_popup_select']) && $sugar_config['securitysuite_popup_select'] == true && isset($_REQUEST['action']) && $_REQUEST['action'] == 'Save' || !empty($_REQUEST['subpanel_field_name'])) {
         //check to see if a member of more than 1 group...if not then just inherit the one.
         //Otherwise, this is taken on the edit view on create now
         $groupFocus = new SecurityGroup();
         $security_modules = $groupFocus->getSecurityModules();
         if (in_array($focus->module_dir, array_keys($security_modules))) {
             //check if user is in more than 1 group. If so then set the session var otherwise inherit it's only group
             global $current_user;
             $memberships = $groupFocus->getMembershipCount($current_user->id);
             if ($memberships > 1) {
                 return;
             }
         }
     }
     SecurityGroup::inherit_creator($focus, $isUpdate);
 }
开发者ID:isrealconsulting,项目名称:ic-suite,代码行数:25,代码来源:SecurityGroup.php

示例3: testinherit_creator

 public function testinherit_creator()
 {
     //unset and reconnect Db to resolve mysqli fetch exeception
     global $db;
     unset($db->database);
     $db->checkConnection();
     $account = new Account();
     $account->id = 1;
     //execute the method and test if it works and does not throws an exception.
     try {
         SecurityGroup::inherit_creator($account, false);
         $this->assertTrue(true);
     } catch (Exception $e) {
         $this->fail();
     }
 }
开发者ID:sacredwebsite,项目名称:SuiteCRM,代码行数:16,代码来源:SecurityGroupTest.php


注:本文中的SecurityGroup::inherit_creator方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。