MCPcopy Index your code
hub / github.com/coder/coder / AsNotifier

Function AsNotifier

coderd/database/dbauthz/dbauthz.go:786–788  ·  view source on GitHub ↗

AsNotifier returns a context with an actor that has permissions required for creating/reading/updating/deleting notifications.

(ctx context.Context)

Source from the content-addressed store, hash-verified

784// AsNotifier returns a context with an actor that has permissions required for
785// creating/reading/updating/deleting notifications.
786func AsNotifier(ctx context.Context) context.Context {
787 return As(ctx, subjectNotifier)
788}
789
790// AsResourceMonitor returns a context with an actor that has permissions required for
791// updating resource monitors.

Callers 15

deleteUserMethod · 0.92
CreateUserMethod · 0.92
notifyTemplateDeletedMethod · 0.92
postTestNotificationMethod · 0.92
putWorkspaceDormantMethod · 0.92
pauseTaskMethod · 0.92
resumeTaskMethod · 0.92

Calls 1

AsFunction · 0.85

Tested by 15

TestSMTPDispatchFunction · 0.74
TestWebhookDispatchFunction · 0.74
TestBackpressureFunction · 0.74
TestRetriesFunction · 0.74
TestNotifierPausedFunction · 0.74
TestDisabledAfterEnqueueFunction · 0.74