Edit permission is no longer patreon-only
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
import { _ } from 'meteor/underscore';
|
||||
import fetchDocByRef from '/imports/api/parenting/fetchDocByRef.js';
|
||||
import { getUserTier } from '/imports/api/users/patreon/tiers.js';
|
||||
|
||||
function assertIdValid(userId){
|
||||
if (!userId || typeof userId !== 'string'){
|
||||
@@ -48,13 +47,6 @@ export function assertEditPermission(doc, userId) {
|
||||
return true;
|
||||
}
|
||||
|
||||
// Ensure the user is of a tier with paid benefits
|
||||
let tier = getUserTier(user);
|
||||
if (!tier.paidBenefits){
|
||||
throw new Meteor.Error('Edit permission denied',
|
||||
`The ${tier.name} tier does not allow you to edit this document`);
|
||||
}
|
||||
|
||||
// Ensure the user is authorized for this specific document
|
||||
if (
|
||||
doc.owner === userId ||
|
||||
|
||||
Reference in New Issue
Block a user