Table of Contents

Interface IIconSettingsService

Namespace
Tharga.Team
Assembly
Tharga.Team.dll

Reading and changing the site's icon settings. Requires a system users:manage grant.

public interface IIconSettingsService

Remarks

This is where the check lives, not in the component. Changing these values changes how avatars resolve for every user of the application, so a surface that wrote to IIconSettingsStore directly would be the only thing standing between any signed-in caller and site-wide behaviour. A component decides what to offer; this decides what is allowed.

users:manage rather than a scope of its own: it already authorizes setting a user's icon on their behalf, and the toolkit's rule is that a new scope is warranted when an operation is irreversible or crosses a tenant boundary. This is neither — it is reversible presentation config.

Registered with AddSystemService, so ScopeProxy requires the system grant and never consults a team one. No argument names a team, so there is nothing here for a team-bound caller to aim at.

Methods

GetAsync()

The settings currently in force on this instance.

[RequireScope("users:manage")]
Task<IconSettingsState> GetAsync()

Returns

Task<IconSettingsState>

SaveAsync(IconSettingsState)

Store settings and apply them to this instance immediately.

[RequireScope("users:manage")]
Task SaveAsync(IconSettingsState settings)

Parameters

settings IconSettingsState

Returns

Task

Remarks

Applied here as well as stored, so whoever made the change sees it at once rather than waiting for a refresh — and on a single-instance host that means everywhere. Other instances re-read on o.Blazor.IconSettingsRefreshInterval.