|
@@ -7,6 +7,9 @@ module.exports = function(crowi) {
|
|
|
, GRANT_SPECIFIED = 3
|
|
, GRANT_SPECIFIED = 3
|
|
|
, GRANT_OWNER = 4
|
|
, GRANT_OWNER = 4
|
|
|
, PAGE_GRANT_ERROR = 1
|
|
, PAGE_GRANT_ERROR = 1
|
|
|
|
|
+
|
|
|
|
|
+ , pageEvent = crowi.event('page')
|
|
|
|
|
+
|
|
|
, pageSchema;
|
|
, pageSchema;
|
|
|
|
|
|
|
|
function isPortalPath(path) {
|
|
function isPortalPath(path) {
|
|
@@ -31,6 +34,8 @@ module.exports = function(crowi) {
|
|
|
updatedAt: Date
|
|
updatedAt: Date
|
|
|
});
|
|
});
|
|
|
|
|
|
|
|
|
|
+ pageEvent.on('updated', pageEvent.onUpdated);
|
|
|
|
|
+
|
|
|
pageSchema.methods.isPublic = function() {
|
|
pageSchema.methods.isPublic = function() {
|
|
|
if (!this.grant || this.grant == GRANT_PUBLIC) {
|
|
if (!this.grant || this.grant == GRANT_PUBLIC) {
|
|
|
return true;
|
|
return true;
|