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


PHP SecurityTestHelper::createGroups方法代码示例

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


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

示例1: setUpBeforeClass

 public static function setUpBeforeClass()
 {
     parent::setUpBeforeClass();
     ZurmoDatabaseCompatibilityUtil::dropStoredFunctionsAndProcedures();
     SecurityTestHelper::createSuperAdmin();
     SecurityTestHelper::createUsers();
     SecurityTestHelper::createGroups();
     SecurityTestHelper::createRoles();
     RedBeanModel::forgetAll();
     //do the rebuild to ensure the tables get created properly.
     ReadPermissionsOptimizationUtil::rebuild();
     //Manually build the test model munge tables.
     ReadPermissionsOptimizationUtil::recreateTable(ReadPermissionsOptimizationUtil::getMungeTableName('OwnedSecurableTestItem'));
     ReadPermissionsOptimizationUtil::recreateTable(ReadPermissionsOptimizationUtil::getMungeTableName('OwnedSecurableTestItem2'));
     $benny = User::getByUsername('benny');
     $model = new OwnedSecurableTestItem();
     $model->member = 'test';
     assert($model->save());
     // Not Coding Standard
     $model = new OwnedSecurableTestItem();
     $model->member = 'test2';
     assert($model->save());
     // Not Coding Standard
     $model = new OwnedSecurableTestItem();
     $model->member = 'test3';
     $model->owner = $benny;
     assert($model->save());
     // Not Coding Standard
     assert(OwnedSecurableTestItem::getCount() == 3);
     // Not Coding Standard
     $model = new OwnedSecurableTestItem2();
     $model->member = 'test5';
     assert($model->save());
     // Not Coding Standard
 }
开发者ID:maruthisivaprasad,项目名称:zurmo,代码行数:35,代码来源:OwnedSecurableItemReadPermissionOptimizationTest.php

示例2: setUpBeforeClass

 public static function setUpBeforeClass()
 {
     parent::setUpBeforeClass();
     SecurityTestHelper::createSuperAdmin();
     SecurityTestHelper::createUsers();
     SecurityTestHelper::createGroups();
 }
开发者ID:RamaKavanan,项目名称:InitialVersion,代码行数:7,代码来源:PolicyTest.php

示例3: setUpBeforeClass

 public static function setUpBeforeClass()
 {
     parent::setUpBeforeClass();
     ZurmoDatabaseCompatibilityUtil::dropStoredFunctionsAndProcedures();
     SecurityTestHelper::createSuperAdmin();
     SecurityTestHelper::createUsers();
     SecurityTestHelper::createGroups();
     SecurityTestHelper::createRoles();
 }
开发者ID:youprofit,项目名称:Zurmo,代码行数:9,代码来源:MenuUtilTest.php

示例4: setUpBeforeClass

 public static function setUpBeforeClass()
 {
     parent::setUpBeforeClass();
     ZurmoDatabaseCompatibilityUtil::dropStoredFunctionsAndProcedures();
     SecurityTestHelper::createSuperAdmin();
     Yii::app()->user->userModel = User::getByUsername('super');
     SecurityTestHelper::createUsers();
     SecurityTestHelper::createGroups();
     SecurityTestHelper::createAccounts();
 }
开发者ID:RamaKavanan,项目名称:InitialVersion,代码行数:10,代码来源:ActionSecurityUtilTest.php

示例5: setUpBeforeClass

 public static function setUpBeforeClass()
 {
     parent::setUpBeforeClass();
     ZurmoDatabaseCompatibilityUtil::dropStoredFunctionsAndProcedures();
     SecurityTestHelper::createSuperAdmin();
     SecurityTestHelper::createUsers();
     SecurityTestHelper::createGroups();
     SecurityTestHelper::createRoles();
     //Forget the cache, otherwise user/role/group information is not properly reflected in the cache.
     RedBeanModel::forgetAll();
 }
开发者ID:RamaKavanan,项目名称:InitialVersion,代码行数:11,代码来源:RightTest.php

示例6: setUpBeforeClass

 public static function setUpBeforeClass()
 {
     parent::setUpBeforeClass();
     $super = SecurityTestHelper::createSuperAdmin();
     self::$emailMessage = EmailMessageTestHelper::createDraftSystemEmail('a test message', $super);
     SecurityTestHelper::createUsers();
     SecurityTestHelper::createGroups();
     SecurityTestHelper::createRoles();
     RedBeanModel::forgetAll();
     //do the rebuild to ensure the tables get created properly.
     ReadPermissionsOptimizationUtil::rebuild();
 }
开发者ID:sandeep1027,项目名称:zurmo_,代码行数:12,代码来源:EmailMessageMashableActivityRulesTest.php

示例7: setUpBeforeClass

 public static function setUpBeforeClass()
 {
     parent::setUpBeforeClass();
     SecurityTestHelper::createSuperAdmin();
     if (static::$createUsersAndGroups) {
         SecurityTestHelper::createUsers();
         SecurityTestHelper::createGroups();
     }
     $everyoneGroup = Group::getByName(Group::EVERYONE_GROUP_NAME);
     assert($everyoneGroup->save());
     // Not Coding Standard
     static::setRandomNonEveryoneNonAdministratorsGroup();
 }
开发者ID:maruthisivaprasad,项目名称:zurmo,代码行数:13,代码来源:ApiBaseTest.php

示例8: setUpBeforeClass

 public static function setUpBeforeClass()
 {
     parent::setUpBeforeClass();
     SecurityTestHelper::createSuperAdmin();
     Yii::app()->user->userModel = User::getByUsername('super');
     SecurityTestHelper::createUsers();
     SecurityTestHelper::createGroups();
     SecurityTestHelper::createAccounts();
     SecurityTestHelper::createRoles();
     $everyone = Group::getByName('Everyone');
     $saved = $everyone->save();
     assert('$saved');
     // Not Coding Standard
     ReadPermissionsOptimizationUtil::rebuild();
 }
开发者ID:youprofit,项目名称:Zurmo,代码行数:15,代码来源:PermissionsTest.php

示例9: setUpBeforeClass

 public static function setUpBeforeClass()
 {
     parent::setUpBeforeClass();
     SecurityTestHelper::createSuperAdmin();
     Yii::app()->user->userModel = User::getByUsername('super');
     SecurityTestHelper::createUsers();
     SecurityTestHelper::createGroups();
     SecurityTestHelper::createAccounts();
     SecurityTestHelper::createRoles();
     $everyone = Group::getByName('Everyone');
     $saved = $everyone->save();
     assert('$saved');
     // Not Coding Standard
     //Add contacts to help test that the rebuild is working correctly
     $contact = ContactTestHelper::createContactByNameForOwner('jason', Yii::app()->user->userModel);
     $contact->addPermissions(User::getByUsername('betty'), Permission::READ);
     $contact->addPermissions(Group::getByName('Support Staff'), Permission::READ);
     $saved = $contact->save();
     assert('$saved');
     // Not Coding Standard
     ReadPermissionsOptimizationUtil::rebuild();
     assert('self::getAccountMungeRowCount() == 0');
     // Not Coding Standard
 }
开发者ID:maruthisivaprasad,项目名称:zurmo,代码行数:24,代码来源:AccountReadPermissionsOptimizationTest.php

示例10: testCannotModifyGroupMembershipForTheTheEveryoneGroup

 public function testCannotModifyGroupMembershipForTheTheEveryoneGroup()
 {
     SecurityTestHelper::createGroups();
     $groups = Group::getAll();
     $group = $groups[0];
     $everyone = Group::getByName(Group::EVERYONE_GROUP_NAME);
     $this->assertFalse($everyone->canModifyMemberships());
 }
开发者ID:youprofit,项目名称:Zurmo,代码行数:8,代码来源:GroupTest.php


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