From 6bc5ddfeb05787647ca223c7d9c893c297e8eaa7 Mon Sep 17 00:00:00 2001 From: Matthew Dillon Date: Fri, 10 Jul 2015 10:52:59 -0800 Subject: [PATCH] Remove old perms utils --- app/utils/user-can-add.js | 3 --- app/utils/user-can-edit.js | 5 ----- tests/unit/utils/user-can-add-test.js | 10 ---------- tests/unit/utils/user-can-edit-test.js | 10 ---------- 4 files changed, 28 deletions(-) delete mode 100644 app/utils/user-can-add.js delete mode 100644 app/utils/user-can-edit.js delete mode 100644 tests/unit/utils/user-can-add-test.js delete mode 100644 tests/unit/utils/user-can-edit-test.js diff --git a/app/utils/user-can-add.js b/app/utils/user-can-add.js deleted file mode 100644 index 68a135b..0000000 --- a/app/utils/user-can-add.js +++ /dev/null @@ -1,3 +0,0 @@ -export default function userCanAdd(role) { - return (role === 'W') || (role === 'A'); -} diff --git a/app/utils/user-can-edit.js b/app/utils/user-can-edit.js deleted file mode 100644 index 20146d5..0000000 --- a/app/utils/user-can-edit.js +++ /dev/null @@ -1,5 +0,0 @@ -export default function userCanEdit(currentUser, author) { - let id = currentUser.id; - let role = currentUser.role; - return (role === 'W' && (+id === author)) || (role === 'A'); -} diff --git a/tests/unit/utils/user-can-add-test.js b/tests/unit/utils/user-can-add-test.js deleted file mode 100644 index d94174e..0000000 --- a/tests/unit/utils/user-can-add-test.js +++ /dev/null @@ -1,10 +0,0 @@ -import userCanAdd from '../../../utils/user-can-add'; -import { module, test } from 'qunit'; - -module('Unit | Utility | user can add'); - -// Replace this with your real tests. -test('it works', function(assert) { - var result = userCanAdd(); - assert.ok(result); -}); diff --git a/tests/unit/utils/user-can-edit-test.js b/tests/unit/utils/user-can-edit-test.js deleted file mode 100644 index a14b4da..0000000 --- a/tests/unit/utils/user-can-edit-test.js +++ /dev/null @@ -1,10 +0,0 @@ -import userCanEdit from '../../../utils/user-can-edit'; -import { module, test } from 'qunit'; - -module('Unit | Utility | user can edit'); - -// Replace this with your real tests. -test('it works', function(assert) { - var result = userCanEdit(); - assert.ok(result); -});