Repository navigation
Conversation
Add a USERDISCOVERABLE boolean to USERPROJECTPREFERENCE and USERENGINEPREFERENCE so each user can mark which projects and engines their agents may find and use. It is off until the user turns it on; a missing row or null reads as off. - Schema and OWL: new column, default false, added on startup - setProjectUserDiscoverable / setEngineUserDiscoverable save it for each of the user's logins, for anyone who can view the item - getUserProjectList / getUserEngineList return project_user_discoverable / engine_user_discoverable (0 or 1), so MyProjects and MyEngines include it; their output schemas list it - New reactors SetProjectUserDiscoverable and SetEngineUserDiscoverable - Unit tests for both
Contributor
✅ Snyk checks have passed. No issues have been found so far.
💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse. |
ckelly17
marked this pull request as draft
November 5, 2026 21:51
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Adds a per-user
USERDISCOVERABLEpreference to projects and engines, so each user can choose which of the projects and engines they can see are discoverable to their agents. An example is a skill shared with a user that they only want to use in certain situations.The flag works the same way as favorite and visibility: it is the user's own setting, stored in
USERPROJECTPREFERENCE/USERENGINEPREFERENCEapart from permissions, and saved for each of the user's logins (id and login type). It is off by default: a missing row or aNULLreads as off until the user turns it on.This PR only stores and returns the flag. Nothing filters what agents see by it yet; that comes when agents start reading it.
Changes Made
USERDISCOVERABLEboolean column, defaultfalse, onUSERPROJECTPREFERENCEandUSERENGINEPREFERENCE(AbstractSecurityUtils). Existing installs add the column on startup; existing rows read as off.SecurityOwlCreator. A missing column makesneedsRemakerebuild the OWL on existing installs.SecurityProjectUtils.setProjectUserDiscoverableandSecurityEngineUtils.setEngineUserDiscoverable, built onsetUserPreference. Same access rule as favorite: allowed when the item is public or the user can view it, so read-only users of a shared item can set it. Setting it adds no permission row.MAX(CAST(USERDISCOVERABLE)).getUserProjectList(both variants) returnsproject_user_discoverableandgetUserEngineListreturnsengine_user_discoverable, as0or1. MyProjects and MyEngines return the field through these methods, and their output schemas now list it.SetProjectUserDiscoverable(project=, discoverable=)andSetEngineUserDiscoverable(engine=, discoverable=)inprerna.reactor.security, picked up by the classpath scan.discoverableis required and must betrueorfalse.SecurityProjectUtilsUnitTestsandSecurityEngineUtilsUnitTests.How to Test
SecurityProjectUtilsUnitTestsandSecurityEngineUtilsUnitTests. The new*UserDiscoverable*tests cover: no access is refused, the flag is off until turned on, turning it on and off changes only that item and keeps the favorite, and a public item can be set by a user with no direct access without adding a permission row or affecting other users.MyProjects()/MyEngines(). Every row should haveproject_user_discoverable/engine_user_discoverableset to0.SetProjectUserDiscoverable(project=["<id>"], discoverable=[true])(orSetEngineUserDiscoverable(engine=["<id>"], discoverable=[true])), then callMyProjects()/MyEngines()again: that item shows1for this user only. Setting it back tofalsereturns it to0.