diff --git a/client/AdminMgmt/ProductMgmt/prodMgmtTbl.html b/client/AdminMgmt/ProductMgmt/prodMgmtTbl.html
index dc77774..6e53a87 100644
--- a/client/AdminMgmt/ProductMgmt/prodMgmtTbl.html
+++ b/client/AdminMgmt/ProductMgmt/prodMgmtTbl.html
@@ -27,8 +27,8 @@
{{prodStore}} |
{{prodLocation}} |
- delete
- edit
+ delete
+ edit
|
{{/each}}
diff --git a/client/General/headerBar.html b/client/General/headerBar.html
index a014823..e15265e 100644
--- a/client/General/headerBar.html
+++ b/client/General/headerBar.html
@@ -9,7 +9,9 @@
{{#if currentUser}}
- My Lists
- - Manage
+ {{#if isInRole 'systemadmin'}}
+ - Manage
+ {{/if}}
- Log Out
{{else}}
- Login
@@ -20,7 +22,9 @@
{{#if currentUser}}
- My Lists
- - Manage
+ {{#if isInRole 'systemadmin'}}
+ - Manage
+ {{/if}}
- Sign Out
{{else}}
- Login
diff --git a/imports/api/products.js b/imports/api/products.js
index f6bf5ab..91775f9 100644
--- a/imports/api/products.js
+++ b/imports/api/products.js
@@ -57,13 +57,6 @@ Meteor.methods({
throw new Meteor.Error('You are not allowed to delete products. Make sure you are logged in with valid user credentials.');
}
- let prodInfo = Products.findOne({ _id: prodId });
- let myId = this.userId;
- if (myId == prodInfo.prodOwner) {
- return Products.remove({ _id: prodId });
- } else {
- console.log("User not allowed to delete this product. Not the owner!");
- return("Not Allowed!");
- }
+ return Products.remove({ _id: prodId });
}
});
\ No newline at end of file