1
0
mirror of https://github.com/altlinux/admc.git synced 2025-01-02 17:17:49 +03:00

Add children class creation rights getter

This commit is contained in:
Semyon Knyazev 2024-10-07 19:41:34 +04:00
parent f13a02bf04
commit d169c5e3b9
2 changed files with 19 additions and 0 deletions

View File

@ -1282,3 +1282,21 @@ QList<SecurityRight> read_write_property_rights(AdConfig *adconfig, const QStrin
return rights;
}
QList<SecurityRight> create_children_class_right(AdConfig *adconfig, const QString &obj_class) {
const QByteArray obj_class_guid = adconfig->guid_from_class(obj_class);
if (obj_class_guid.isEmpty()) {
return QList<SecurityRight>();
}
const QList<SecurityRight> rights = {
SecurityRight {
SEC_ADS_CREATE_CHILD,
obj_class_guid,
QByteArray(),
SEC_ACE_FLAG_CONTAINER_INHERIT
}
};
return rights;
}

View File

@ -134,5 +134,6 @@ QList<SecurityRight> control_children_class_right(AdConfig *adconfig, const QStr
QList<SecurityRight> children_class_read_write_prop_rights(AdConfig *adconfig, const QString &obj_class, const QString &attribute);
QList<SecurityRight> read_all_children_class_info_rights(AdConfig *adconfig, const QString &obj_class);
QList<SecurityRight> read_write_property_rights(AdConfig *adconfig, const QString &attribute);
QList<SecurityRight> create_children_class_right(AdConfig *adconfig, const QString &obj_class);
#endif /* AD_SECURITY_H */