From 4eb27a4dd4e49e1eb391554f4473429c8476db79 Mon Sep 17 00:00:00 2001 From: Denis Arh Date: Mon, 11 Mar 2019 14:14:26 +0100 Subject: [PATCH] Add missing context to permission endpoints --- system/rest/permissions.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/system/rest/permissions.go b/system/rest/permissions.go index 9fa75cf90..28b0963e1 100644 --- a/system/rest/permissions.go +++ b/system/rest/permissions.go @@ -26,17 +26,17 @@ func (Permissions) New() *Permissions { } func (ctrl *Permissions) List(ctx context.Context, r *request.PermissionsList) (interface{}, error) { - return ctrl.svc.rules.List() + return ctrl.svc.rules.With(ctx).List() } func (ctrl *Permissions) Read(ctx context.Context, r *request.PermissionsRead) (interface{}, error) { - return ctrl.svc.rules.Read(r.RoleID) + return ctrl.svc.rules.With(ctx).Read(r.RoleID) } func (ctrl *Permissions) Delete(ctx context.Context, r *request.PermissionsDelete) (interface{}, error) { - return ctrl.svc.rules.Delete(r.RoleID) + return ctrl.svc.rules.With(ctx).Delete(r.RoleID) } func (ctrl *Permissions) Update(ctx context.Context, r *request.PermissionsUpdate) (interface{}, error) { - return ctrl.svc.rules.Update(r.RoleID, r.Permissions) + return ctrl.svc.rules.With(ctx).Update(r.RoleID, r.Permissions) }