Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

## Unreleased

### Fixes

- The SDK no longer wrongly disables the org slug field based on assumed the auth-tolken type ([#2537](https://github.com/getsentry/sentry-unity/pull/2537))

### Dependencies

- Bump Cocoa SDK from v9.4.0 to v9.4.1 ([#2540](https://github.com/getsentry/sentry-unity/pull/2540))
Expand Down
15 changes: 0 additions & 15 deletions src/Sentry.Unity.Editor/ConfigurationWindow/DebugSymbolsTab.cs
Original file line number Diff line number Diff line change
Expand Up @@ -35,27 +35,12 @@ internal static void Display(SentryCliOptions cliOptions)
"The authorization token from your user settings in Sentry"),
cliOptions.Auth);

// Org tokens have a `sntrys` prefix and do not require an organisation
var isOrgAuthToken = cliOptions.IsOrgAuthToken();
if (isOrgAuthToken)
{
EditorGUILayout.HelpBox(
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Org Slug error icon removed instead of simplified

Medium Severity

The Org Slug field's GUIContent lost its ErrorIcon argument entirely. The Auth Token and Project Name fields both still show SentryWindow.ErrorIcon when UploadSymbols is enabled and the value is empty, but the Org Slug field no longer does. The old code conditionally showed the icon via !isOrgAuthToken; removing the org-auth-token logic means the condition simplifies to cliOptions.UploadSymbols && string.IsNullOrWhiteSpace(cliOptions.Organization), but instead the whole icon expression was dropped.

Fix in Cursor Fix in Web

"Organization Auth Token detected. The token's embedded 'org slug' will be used during " +
"symbol upload.",
MessageType.Info);
}

EditorGUI.BeginDisabledGroup(isOrgAuthToken);

cliOptions.Organization = EditorGUILayout.TextField(
new GUIContent(
"Org Slug",
cliOptions.UploadSymbols && string.IsNullOrWhiteSpace(cliOptions.Organization) && !isOrgAuthToken ? SentryWindow.ErrorIcon : null,
"The organization slug in Sentry"),
cliOptions.Organization);

EditorGUI.EndDisabledGroup();

cliOptions.Project = EditorGUILayout.TextField(
new GUIContent(
"Project Name",
Expand Down
2 changes: 0 additions & 2 deletions src/Sentry.Unity/SentryCliOptions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,6 @@ internal static string GetConfigPath(string? notDefaultConfigName = null)
private static void MissingFieldWarning(IDiagnosticLogger? logger, string name) =>
logger?.LogWarning("{0} missing. Please set it under {1}", name, EditorMenuPath);

public bool IsOrgAuthToken() => Auth is not null && Auth.StartsWith("sntrys_");

public bool IsValid(IDiagnosticLogger? logger, bool isDevelopmentBuild)
{
if (!UploadSymbols)
Expand Down
Loading