@@ -49,6 +49,8 @@ namespace ocs {
4949 std::string object_key; // /< specific object name or ID
5050 std::string object_owner; // /< owner of the target object
5151 std::string request_user; // /< authenticated requesting user
52+ std::string request_group; // /< primary UNIX group of the requesting user
53+ const lList *request_grp_list{nullptr }; // /< supplementary UNIX groups (ST_Type list)
5254 std::vector<std::string> source_hostgroups; // /< @groups the source host belongs to
5355 std::vector<std::string> required_value_constraints; // /< elevated permissions required by the request
5456 };
@@ -130,5 +132,18 @@ namespace ocs {
130132 * @param rules Receives the collected rules (appended, not replaced).
131133 */
132134 static void collect_perm_rules (const char *role_name, const lList *role_list, PermRuleList &rules);
135+
136+ /* *
137+ * Evaluate whether a request is authorized under the current role configuration.
138+ * Iterates all enabled roles; for each role the requesting user belongs to,
139+ * collects the effective rule set (own + inherited) and evaluates each rule.
140+ * Returns true on the first matching rule. Returns false if no rule matches
141+ * across all applicable roles (default-deny).
142+ * @param role_list The master role list.
143+ * @param userset_list The master userset list (for membership checks).
144+ * @param ctx The request context.
145+ * @return True if the request is authorized.
146+ */
147+ static bool is_authorized (const lList *role_list, const lList *userset_list, const MatchContext &ctx);
133148 };
134149}
0 commit comments