Home
last modified time | relevance | path

Searched refs:AdminType (Results 1 – 25 of 30) sorted by relevance

12

/base/customization/enterprise_device_management/common/native/include/
Dedm_permission.h28 EdmPermission(const std::string &name, AdminType type);
43 AdminType getAdminType() const;
45 void setAdminType(AdminType adminType);
49 AdminType adminType_ = AdminType::UNKNOWN;
Dadmin_type.h21 enum class AdminType { enum
/base/customization/enterprise_device_management/common/native/src/
Dedm_permission.cpp24 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/
Dadmin_manager_test.cpp86 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 …]
Dedm_permission_test.cpp44 permission1.setAdminType(AdminType::NORMAL);
46 permission2.setAdminType(AdminType::NORMAL);
60 EdmPermission permission1("ohos.permission.EDM_TEST_PERMISSION", AdminType::NORMAL);
Denterprise_device_mgr_proxy_test.cpp60 …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/
Dsuper_admin.cpp21 AdminType SuperAdmin::GetAdminType() in GetAdminType()
23 return AdminType::ENT; in GetAdminType()
Dadmin_manager.cpp93 …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 …]
Denterprise_device_mgr_ability.cpp128 …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 …]
Denterprise_device_mgr_stub.cpp123 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()
Dpermission_manager.cpp41 AdminPermission adminPermission(permission, static_cast<AdminType>(permissionType)); in AddPermission()
45 } else if (entry->second.adminType != static_cast<AdminType>(permissionType)) { in AddPermission()
Dadmin.cpp31 AdminType Admin::GetAdminType() in GetAdminType()
Dadmin_policies_storage_rdb.cpp62 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/
Denterprise_device_mgr_ability_test.cpp125 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/
Dadmin.h32 AdminType adminType_;
44 virtual AdminType GetAdminType();
Dpermission_manager.h31 AdminType adminType;
32 …AdminPermission(std::string _permissionName, AdminType _adminType) : permissionName(_permissionNam… in AdminPermission()
Dadmin_policies_storage_rdb.h32 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);
Dadmin_manager.h43 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,
Dsuper_admin.h25 AdminType GetAdminType() override;
Denterprise_device_mgr_ability.h47 …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/
Denterprise_device_mgr_proxy.h42 …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);
Dienterprise_device_mgr.h35 …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/
Dedm_command.cpp103 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/
Dedm_command.h47 ErrCode RunAsEnableCommand(AdminType type);
/base/customization/enterprise_device_management/test/unittest/enterprise_device_mgr_proxy/enterprise_device_mgr_proxy_test/
Denterprise_device_mgr_stub_mock.h87 …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()

12