Skip to content

Only show edit schema button to authorized users in SubjectEditorDialog#428

Merged
JeroenDeDauw merged 1 commit into
masterfrom
followup-369
Jan 20, 2026
Merged

Only show edit schema button to authorized users in SubjectEditorDialog#428
JeroenDeDauw merged 1 commit into
masterfrom
followup-369

Conversation

@alistair3149

@alistair3149 alistair3149 commented Jan 20, 2026

Copy link
Copy Markdown
Member

For #369

Recording.2026-01-20.172700.mp4

@alistair3149
alistair3149 marked this pull request as ready for review January 20, 2026 22:27
@alistair3149 alistair3149 changed the title Hide edit schema button if user is not authorized in SubjectEditorDialog Only show edit schema button to authorized users in SubjectEditorDialog Jan 20, 2026
try {
canEditSchema.value = await NeoWikiServices.getSchemaAuthorizer().canEditSchema( props.subject.getSchemaName() );
} catch ( error ) {
console.error( 'Failed to check schema permissions:', error );

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

For the error handling, should we aim for consistency (i.e., logging to both the console and notifications) or be situational?

In this case, I think that the schema edit permission error isn't critical for the SubjectEditor, so I did not display the error as a notification.

@JeroenDeDauw
JeroenDeDauw merged commit c337b45 into master Jan 20, 2026
6 checks passed
@JeroenDeDauw
JeroenDeDauw deleted the followup-369 branch January 20, 2026 22:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants