only allow admins to set global notifications
Signed-off-by: jkoberg <jkoberg@owncloud.com>
This commit is contained in:
@@ -31,6 +31,7 @@ type Options struct {
|
||||
GatewaySelector pool.Selectable[gateway.GatewayAPIClient]
|
||||
HistoryClient ehsvc.EventHistoryService
|
||||
ValueClient settingssvc.ValueService
|
||||
RoleClient settingssvc.RoleService
|
||||
RegisteredEvents []events.Unmarshaller
|
||||
}
|
||||
|
||||
@@ -128,3 +129,10 @@ func Value(vs settingssvc.ValueService) Option {
|
||||
o.ValueClient = vs
|
||||
}
|
||||
}
|
||||
|
||||
// Roles provides a function to configure the roles service client
|
||||
func Role(rs settingssvc.RoleService) Option {
|
||||
return func(o *Options) {
|
||||
o.RoleClient = rs
|
||||
}
|
||||
}
|
||||
|
||||
@@ -77,6 +77,7 @@ func Server(opts ...Option) (http.Service, error) {
|
||||
svc.HistoryClient(options.HistoryClient),
|
||||
svc.GatewaySelector(options.GatewaySelector),
|
||||
svc.ValueClient(options.ValueClient),
|
||||
svc.RoleClient(options.RoleClient),
|
||||
svc.RegisteredEvents(options.RegisteredEvents),
|
||||
)
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user