Updated useraccounts, character settings to Polymer 1
This commit is contained in:
@@ -5,6 +5,7 @@ Meteor.methods({
|
||||
charId,
|
||||
{fields: {owner: 1, writers: 1}}
|
||||
);
|
||||
if (!char) return true;
|
||||
return (userId && char.owner === userId || _.contains(char.writers, userId));
|
||||
},
|
||||
});
|
||||
@@ -30,6 +31,7 @@ CHARACTER_SUBSCHEMA_ALLOW = {
|
||||
doc.charId,
|
||||
{fields: {owner: 1, writers: 1}}
|
||||
);
|
||||
if (!char) return true;
|
||||
return userId && char.owner === userId || _.contains(char.writers, userId);
|
||||
},
|
||||
fetch: ["charId"],
|
||||
|
||||
@@ -14,31 +14,42 @@ AccountsTemplates.configure({
|
||||
showAddRemoveServices: true,
|
||||
showForgotPasswordLink: true,
|
||||
showResendVerificationEmailLink: true,
|
||||
texts: {
|
||||
resendVerificationEmailLink_link: "Resend email verification",
|
||||
},
|
||||
});
|
||||
|
||||
AccountsTemplates.configureRoute("changePwd", {
|
||||
template: "titledAtForm",
|
||||
layoutTemplate: 'layout',
|
||||
});
|
||||
AccountsTemplates.configureRoute("enrollAccount", {
|
||||
template: "titledAtForm",
|
||||
layoutTemplate: 'layout',
|
||||
});
|
||||
AccountsTemplates.configureRoute("forgotPwd", {
|
||||
template: "titledAtForm",
|
||||
layoutTemplate: 'layout',
|
||||
});
|
||||
AccountsTemplates.configureRoute("resetPwd", {
|
||||
template: "titledAtForm",
|
||||
layoutTemplate: 'layout',
|
||||
});
|
||||
AccountsTemplates.configureRoute("signIn", {
|
||||
template: "titledAtForm",
|
||||
layoutTemplate: 'layout',
|
||||
});
|
||||
AccountsTemplates.configureRoute("signUp", {
|
||||
template: "titledAtForm",
|
||||
layoutTemplate: 'layout',
|
||||
});
|
||||
AccountsTemplates.configureRoute("verifyEmail", {
|
||||
template: "titledAtForm",
|
||||
layoutTemplate: 'layout',
|
||||
});
|
||||
AccountsTemplates.configureRoute("resendVerificationEmail", {
|
||||
template: "titledAtForm",
|
||||
layoutTemplate: 'layout',
|
||||
});
|
||||
|
||||
if (Meteor.isServer){
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
canEditCharacter = function(charId, userId){
|
||||
userId = userId || Meteor.userId();
|
||||
var char = Characters.findOne(charId, {fields: {owner: 1, writers: 1}});
|
||||
if (!char) return false;
|
||||
if (!char) return true;
|
||||
return (userId === char.owner || _.contains(char.writers, userId));
|
||||
};
|
||||
|
||||
@@ -11,7 +11,7 @@ canViewCharacter = function(charId, userId){
|
||||
charId,
|
||||
{fields: {owner: 1, writers: 1, readers: 1}}
|
||||
);
|
||||
if (!char) return false;
|
||||
if (!char) return true;
|
||||
return userId === char.owner ||
|
||||
_.contains(char.writers, userId) ||
|
||||
_.contains(char.readers, userId);
|
||||
|
||||
Reference in New Issue
Block a user