From 1e7985a87a72bea9a308cf1506dacc828c6e2e1c Mon Sep 17 00:00:00 2001 From: Christopher Speller Date: Tue, 13 Sep 2016 12:42:48 -0400 Subject: Modifying permissions system. (#3897) --- api/context_test.go | 20 -------------------- 1 file changed, 20 deletions(-) (limited to 'api/context_test.go') diff --git a/api/context_test.go b/api/context_test.go index c3c7a9768..88ba0f665 100644 --- a/api/context_test.go +++ b/api/context_test.go @@ -8,26 +8,6 @@ import ( "testing" ) -func TestContext(t *testing.T) { - context := Context{} - - context.IpAddress = "127.0.0.1" - context.Session.UserId = "5" - - if !context.HasPermissionsToUser("5", "") { - t.Fatal("should have permissions") - } - - if context.HasPermissionsToUser("6", "") { - t.Fatal("shouldn't have permissions") - } - - context.Session.Roles = model.ROLE_SYSTEM_ADMIN - if !context.HasPermissionsToUser("6", "") { - t.Fatal("should have permissions") - } -} - func TestCache(t *testing.T) { session := &model.Session{ Id: model.NewId(), -- cgit v1.2.3-1-g7c22