Global and Project Scopes
When building an app for YouTrack, it's important to understand the distinction between global and project scopes. These scopes determine the level at which features, settings, and extensions are available within the system.
Scopes for Extension Points
Each extension point for an app is designed to work at the global scope or project scope.
An extension point with a global scope is available throughout the system. This means it can be accessed by users outside the context of a specific project.
An extension point with a project scope is limited to a particular project. Widgets that use these extension points are only available in the context of a project where the app has been attached and the widget is active. Users will only have access to the widget if they have access to the project as well.
The following extension points have a global scope:
ADMINISTRATION_MENU_ITEM
DASHBOARD_WIDGET
MAIN_MENU_ITEM
MARKDOWN
USER_CARD
USER_PROFILE_SETTINGS
These extension points have a project scope:
ARTICLE_ABOVE_ACTIVITY_STREAM
ARTICLE_BELOW_SUMMARY
ARTICLE_OPTIONS_MENU_ITEM
ISSUE_ABOVE_ACTIVITY_STREAM
ISSUE_BELOW_SUMMARY
ISSUE_FIELD_PANEL_LAST
ISSUE_FIELD_PANEL_FIRST
ISSUE_OPTIONS_MENU_ITEM
PROJECT_SETTINGS
PROJECT_TAB
HELPDESK_CHANNEL
For more information about extension points, see Extension Points for Widgets.
Scopes for HTTP Handlers
The same concept applies to HTTP handlers, which are also accessible either at the global or project level.
HTTP handlers with the following endpoints are scoped at the global level:
globaluser
HTTP handlers with the following endpoints are scoped at the project level:
issuearticleproject
With HTTP handlers, you cannot mix global-level and project-level endpoints in a single handler. You can combine global and user endpoints in one handler, or combine issue, article, and project endpoints in one handler. To use endpoints from both groups in one app, declare them in separate handler files.
Attaching an app to a project does not limit its global-level HTTP handlers to that project. These endpoints remain available at the system level. Use Visibility on the app's Settings tab to choose who can access them. To disable these endpoints for everyone, deactivate the app.
Project-level handlers, on the other hand, must be activated per-project and are only accessible in the projects where the app has been attached and the module that contains the HTTP handler is active.
HTTP handler scopes also affect who has permission to manage modules for the app.
Modules that contain HTTP handlers for global-level endpoints can only be managed by users with the Low-level Admin Write permission. This permission is usually reserved for system administrators.
If a user who doesn't have Low-level Admin Write permission installs or imports an app that contains a global module, the app will be deactivated automatically. It can only be activated by a user who has sufficient permissions.
Users with Update Project permission can activate and configure project-level HTTP handler modules in the corresponding projects.
Updating handler code requires app content permissions. For details, see Authentication for Apps.
For more information about HTTP handlers for YouTrack apps, see HTTP Handlers.