/base/customization/enterprise_device_management/common/native/include/ |
D | edm_permission.h | 28 EdmPermission(const std::string &name, AdminType type); 43 AdminType getAdminType() const; 45 void setAdminType(AdminType adminType); 49 AdminType adminType_ = AdminType::UNKNOWN;
|
D | admin_type.h | 21 enum class AdminType { enum
|
/base/customization/enterprise_device_management/common/native/src/ |
D | edm_permission.cpp | 24 EdmPermission::EdmPermission(const std::string &name, AdminType type) in EdmPermission() 38 AdminType EdmPermission::getAdminType() const in getAdminType() 43 void EdmPermission::setAdminType(AdminType adminType) in setAdminType() 57 …if (type == static_cast<int32_t>(AdminType::NORMAL) || type == static_cast<int32_t>(AdminType::ENT… in ReadFromParcel() 58 adminType_ = static_cast<AdminType>(type); in ReadFromParcel()
|
/base/customization/enterprise_device_management/test/unittest/src/ |
D | admin_manager_test.cpp | 86 ErrCode res = adminMgr_->GetGrantedPermission(permissions, AdminType::NORMAL); 90 res = adminMgr_->GetGrantedPermission(permissions, AdminType::NORMAL); 95 res = adminMgr_->GetGrantedPermission(permissions, AdminType::ENT); 100 res = adminMgr_->GetGrantedPermission(permissions, AdminType::NORMAL); 105 res = adminMgr_->GetGrantedPermission(permissions, AdminType::ENT); 127 …res = adminMgr_->SetAdminValue(abilityInfo, entInfo, AdminType::NORMAL, permissions, DEFAULT_USER_… 134 …res = adminMgr_->SetAdminValue(abilityInfo, entInfo, AdminType::ENT, permissions, DEFAULT_USER_ID); 158 …res = adminMgr_->SetAdminValue(abilityInfo, entInfo, AdminType::NORMAL, permissions, DEFAULT_USER_… 167 …res = adminMgr_->SetAdminValue(abilityInfo, entInfo, AdminType::ENT, permissions, DEFAULT_USER_ID); 195 …res = adminMgr_->SetAdminValue(abilityInfo, entInfo, AdminType::NORMAL, permissions, DEFAULT_USER_… [all …]
|
D | edm_permission_test.cpp | 44 permission1.setAdminType(AdminType::NORMAL); 46 permission2.setAdminType(AdminType::NORMAL); 60 EdmPermission permission1("ohos.permission.EDM_TEST_PERMISSION", AdminType::NORMAL);
|
D | enterprise_device_mgr_proxy_test.cpp | 60 …ErrCode errVal = enterpriseDeviceMgrProxyTest->EnableAdmin(admin, entInfo, AdminType::NORMAL, DEFA… 81 enterpriseDeviceMgrProxyTest->GetEnabledAdmin(AdminType::NORMAL, enabledAdminList1); 107 …ErrCode errVal = enterpriseDeviceMgrProxyTest->EnableAdmin(admin, entInfo, AdminType::ENT, DEFAULT…
|
/base/customization/enterprise_device_management/services/edm/src/ |
D | super_admin.cpp | 21 AdminType SuperAdmin::GetAdminType() in GetAdminType() 23 return AdminType::ENT; in GetAdminType()
|
D | admin_manager.cpp | 93 …ger::SetAdminValue(AppExecFwk::ExtensionAbilityInfo &abilityInfo, EntInfo &entInfo, AdminType role, in SetAdminValue() 109 if (role == AdminType::NORMAL && it.adminType == AdminType::ENT) { in SetAdminValue() 124 if (role == AdminType::NORMAL) { in SetAdminValue() 191 ErrCode AdminManager::GetGrantedPermission(std::vector<std::string> &permissions, AdminType type) in GetGrantedPermission() 208 if ((type == AdminType::NORMAL) && (it.adminType == AdminType::ENT)) { in GetGrantedPermission() 258 …[](const std::shared_ptr<Admin> &admin) { return admin->adminInfo_.adminType_ == AdminType::ENT; }… in IsSuperAdminExist() 273 return superAdmin->adminInfo_.adminType_ == AdminType::ENT || in IsSuperOrSubSuperAdmin() 274 superAdmin->adminInfo_.adminType_ == AdminType::SUB_SUPER_ADMIN; in IsSuperOrSubSuperAdmin() 281 void AdminManager::GetEnabledAdmin(AdminType role, std::vector<std::string> &packageNameList, int32… in GetEnabledAdmin() 291 if (static_cast<int32_t>(role) >= static_cast<int32_t>(AdminType::UNKNOWN) || in GetEnabledAdmin() [all …]
|
D | enterprise_device_mgr_ability.cpp | 128 …if ((subAdmin->GetAdminType() == AdminType::SUB_SUPER_ADMIN || subAdmin->GetAdminType() == AdminTy… in OnCommonEventUserRemoved() 151 if (admin->adminInfo_.adminType_ == AdminType::NORMAL) { in OnCommonEventPackageRemoved() 154 … if (admin->adminInfo_.adminType_ == AdminType::SUB_SUPER_ADMIN && userId == DEFAULT_USER_ID) { in OnCommonEventPackageRemoved() 157 if (admin->adminInfo_.adminType_ == AdminType::ENT && userId == DEFAULT_USER_ID) { in OnCommonEventPackageRemoved() 239 GetEnabledAdmin(AdminType::NORMAL, enabledAdminList); in Dump() 446 …erpriseDeviceMgrAbility::VerifyEnableAdminCondition(AppExecFwk::ElementName &admin, AdminType type, in VerifyEnableAdminCondition() 449 if (type == AdminType::UNKNOWN) { in VerifyEnableAdminCondition() 453 if (type == AdminType::ENT && userId != DEFAULT_USER_ID) { in VerifyEnableAdminCondition() 460 if (existAdmin->GetAdminType() == AdminType::SUB_SUPER_ADMIN) { in VerifyEnableAdminCondition() 464 …if (existAdmin->GetAdminType() == AdminType::ENT && (type != AdminType::ENT || userId != DEFAULT_U… in VerifyEnableAdminCondition() [all …]
|
D | enterprise_device_mgr_stub.cpp | 123 AdminType adminType = AdminType::UNKNOWN; in EnableAdminInner() 124 …if (type == static_cast<int32_t>(AdminType::NORMAL) || type == static_cast<int32_t>(AdminType::ENT… in EnableAdminInner() 125 adminType = static_cast<AdminType>(type); in EnableAdminInner() 177 int32_t type = static_cast<int32_t>(AdminType::UNKNOWN); in GetEnabledAdminInner() 184 ErrCode res = GetEnabledAdmin((AdminType)type, enabledAdminList); in GetEnabledAdminInner()
|
D | permission_manager.cpp | 41 AdminPermission adminPermission(permission, static_cast<AdminType>(permissionType)); in AddPermission() 45 } else if (entry->second.adminType != static_cast<AdminType>(permissionType)) { in AddPermission()
|
D | admin.cpp | 31 AdminType Admin::GetAdminType() in GetAdminType()
|
D | admin_policies_storage_rdb.cpp | 62 const EntInfo &entInfo, AdminType role, const std::vector<std::string> &permissions) in InsertAdmin() 77 const EntInfo &entInfo, AdminType role, const std::vector<std::string> &permissions) in UpdateAdmin() 94 const AppExecFwk::ExtensionAbilityInfo &abilityInfo, const EntInfo &entInfo, AdminType role, in CreateValuesBucket() 242 item->adminInfo_.adminType_ = static_cast<AdminType>(adminType); in SetAdminItems() 288 …valuesBucket.PutInt(EdmRdbFiledConst::FILED_ADMIN_TYPE, static_cast<int32_t>(AdminType::SUB_SUPER_… in InsertAuthorizedAdmin()
|
/base/customization/enterprise_device_management/test/unittest/enterprise_device_mgr_ability/enterprise_device_mgr_ability_test/ |
D | enterprise_device_mgr_ability_test.cpp | 125 ErrCode res = edmMgr_->EnableAdmin(admin, entInfo, AdminType::NORMAL, 0); 141 ErrCode res = edmMgr_->EnableAdmin(admin, entInfo, AdminType::NORMAL, 1); 164 ErrCode res = edmMgr_->EnableAdmin(admin, entInfo, AdminType::NORMAL, DEFAULT_USER_ID); 196 ErrCode res = edmMgr_->EnableAdmin(admin, entInfo, AdminType::NORMAL, DEFAULT_USER_ID); 222 ErrCode res = edmMgr_->EnableAdmin(admin, entInfo, AdminType::NORMAL, DEFAULT_USER_ID); 254 ErrCode res = edmMgr_->EnableAdmin(admin, entInfo, AdminType::NORMAL, DEFAULT_USER_ID); 276 ErrCode res = edmMgr_->EnableAdmin(admin, entInfo, AdminType::NORMAL, DEFAULT_USER_ID); 280 edmMgr_->GetEnabledAdmin(AdminType::NORMAL, enabledAdminList); // normal admin not empty 309 ErrCode res = edmMgr_->EnableAdmin(admin, entInfo, AdminType::ENT, DEFAULT_USER_ID); 350 res = edmMgr_->EnableAdmin(admin, entInfo, AdminType::ENT, DEFAULT_USER_ID); [all …]
|
/base/customization/enterprise_device_management/services/edm/include/ |
D | admin.h | 32 AdminType adminType_; 44 virtual AdminType GetAdminType();
|
D | permission_manager.h | 31 AdminType adminType; 32 …AdminPermission(std::string _permissionName, AdminType _adminType) : permissionName(_permissionNam… in AdminPermission()
|
D | admin_policies_storage_rdb.h | 32 AdminType role, const std::vector<std::string> &permissions); 34 AdminType role, const std::vector<std::string> &permissions); 49 const EntInfo &entInfo, AdminType role, const std::vector<std::string> &permissions);
|
D | admin_manager.h | 43 ErrCode GetGrantedPermission(std::vector<std::string> &permissions, AdminType type); 47 void GetEnabledAdmin(AdminType role, std::vector<std::string> &packageNameList, int32_t userId); 49 …Code SetAdminValue(AppExecFwk::ExtensionAbilityInfo &abilityInfo, EntInfo &entInfo, AdminType role,
|
D | super_admin.h | 25 AdminType GetAdminType() override;
|
D | enterprise_device_mgr_ability.h | 47 …ErrCode EnableAdmin(AppExecFwk::ElementName &admin, EntInfo &entInfo, AdminType type, int32_t user… 53 ErrCode GetEnabledAdmin(AdminType type, std::vector<std::string> &enabledAdminList) override; 88 …ErrCode VerifyEnableAdminCondition(AppExecFwk::ElementName &admin, AdminType type, int32_t userId);
|
/base/customization/enterprise_device_management/interfaces/inner_api/common/include/ |
D | enterprise_device_mgr_proxy.h | 42 …ErrCode EnableAdmin(AppExecFwk::ElementName &admin, EntInfo &entInfo, AdminType type, int32_t user… 45 ErrCode GetEnabledAdmin(AdminType type, std::vector<std::string> &enabledAdminList); 73 void GetEnabledAdmins(AdminType type, std::vector<std::string> &enabledAdminList);
|
D | ienterprise_device_mgr.h | 35 …virtual ErrCode EnableAdmin(AppExecFwk::ElementName &admin, EntInfo &entInfo, AdminType type, int3… 41 virtual ErrCode GetEnabledAdmin(AdminType type, std::vector<std::string> &enabledAdminList) = 0;
|
/base/customization/enterprise_device_management/tools/edm/src/ |
D | edm_command.cpp | 103 return RunAsEnableCommand(AdminType::NORMAL); in RunAsEnableAdminCommand() 108 return RunAsEnableCommand(AdminType::ENT); in RunAsEnableSuperAdminCommand() 111 ErrCode EdmCommand::RunAsEnableCommand(AdminType type) in RunAsEnableCommand()
|
/base/customization/enterprise_device_management/tools/edm/include/ |
D | edm_command.h | 47 ErrCode RunAsEnableCommand(AdminType type);
|
/base/customization/enterprise_device_management/test/unittest/enterprise_device_mgr_proxy/enterprise_device_mgr_proxy_test/ |
D | enterprise_device_mgr_stub_mock.h | 87 …ErrCode EnableAdmin(AppExecFwk::ElementName &admin, EntInfo &entInfo, AdminType type, int32_t user… in EnableAdmin() 107 …ErrCode GetEnabledAdmin(AdminType type, std::vector<std::string> &enabledAdminList) override { ret… in GetEnabledAdmin()
|