mirror of
https://github.com/vale981/Vulcan
synced 2025-03-06 10:01:40 -05:00
Merge branch 'unblock' of https://github.com/queso/Telescope into queso-unblock
This commit is contained in:
commit
155c1157e9
4 changed files with 24 additions and 2 deletions
|
@ -184,6 +184,9 @@ Meteor.methods({
|
|||
post.userId = user._id;
|
||||
}
|
||||
|
||||
post.user_ip = this.connection.clientAddress;
|
||||
post.user_agent = this.connection.httpHeaders["user-agent"];
|
||||
|
||||
return Posts.submit(post);
|
||||
},
|
||||
|
||||
|
|
|
@ -201,6 +201,21 @@ Posts.schema = new SimpleSchema({
|
|||
type: Boolean,
|
||||
optional: true
|
||||
},
|
||||
/**
|
||||
Save info for later spam checking on a post. We will use this for the akismet package
|
||||
*/
|
||||
user_ip: {
|
||||
type: String,
|
||||
optional: true
|
||||
},
|
||||
user_agent: {
|
||||
type: String,
|
||||
optional: true
|
||||
},
|
||||
referrer: {
|
||||
type: String,
|
||||
optional: true
|
||||
},
|
||||
/**
|
||||
The post author's name
|
||||
*/
|
||||
|
|
|
@ -3,7 +3,7 @@ Posts._ensureIndex({"status": 1, "postedAt": 1});
|
|||
// Publish a list of posts
|
||||
|
||||
Meteor.publish('postsList', function(terms) {
|
||||
|
||||
this.unblock();
|
||||
terms.userId = this.userId; // add userId to terms
|
||||
|
||||
if(Users.can.viewById(this.userId)){
|
||||
|
@ -20,6 +20,7 @@ Meteor.publish('postsList', function(terms) {
|
|||
|
||||
Meteor.publish('postsListUsers', function(terms) {
|
||||
|
||||
this.unblock();
|
||||
terms.userId = this.userId; // add userId to terms
|
||||
|
||||
if(Users.can.viewById(this.userId)){
|
||||
|
@ -44,6 +45,7 @@ Meteor.publish('postsListUsers', function(terms) {
|
|||
Meteor.publish('singlePost', function(postId) {
|
||||
|
||||
check(postId, String);
|
||||
this.unblock();
|
||||
|
||||
if (Users.can.viewById(this.userId)){
|
||||
return Posts.find(postId);
|
||||
|
@ -56,6 +58,7 @@ Meteor.publish('singlePost', function(postId) {
|
|||
Meteor.publish('postUsers', function(postId) {
|
||||
|
||||
check(postId, String);
|
||||
this.unblock();
|
||||
|
||||
if (Users.can.viewById(this.userId)){
|
||||
// publish post author and post commenters
|
||||
|
|
|
@ -14,7 +14,8 @@ Package.onUse(function (api) {
|
|||
'telescope:i18n@0.25.6',
|
||||
'telescope:settings@0.25.6',
|
||||
'telescope:users@0.25.6',
|
||||
'telescope:comments@0.25.6'
|
||||
'telescope:comments@0.25.6',
|
||||
'meteorhacks:unblock'
|
||||
]);
|
||||
|
||||
api.addFiles([
|
||||
|
|
Loading…
Add table
Reference in a new issue