diff options
-rw-r--r-- | CHANGELOG.md | 2 | ||||
-rw-r--r-- | Stackerfile.yml | 2 | ||||
-rw-r--r-- | models/users.js | 39 | ||||
-rw-r--r-- | package.json | 2 | ||||
-rw-r--r-- | public/api/wekan.html | 4 | ||||
-rw-r--r-- | public/api/wekan.yml | 2 | ||||
-rw-r--r-- | sandstorm-pkgdef.capnp | 4 |
7 files changed, 36 insertions, 19 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md index 656d42fb..cff600db 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,4 @@ -# Upcoming Wekan release +# v3.22 2019-08-20 Wekan release This release adds the following new features: diff --git a/Stackerfile.yml b/Stackerfile.yml index 9f9bfda5..895fe87c 100644 --- a/Stackerfile.yml +++ b/Stackerfile.yml @@ -1,5 +1,5 @@ appId: wekan-public/apps/77b94f60-dec9-0136-304e-16ff53095928 -appVersion: "v3.21.0" +appVersion: "v3.22.0" files: userUploads: - README.md diff --git a/models/users.js b/models/users.js index dc286128..0d1f2271 100644 --- a/models/users.js +++ b/models/users.js @@ -259,21 +259,38 @@ Users.attachSchema( Users.before.update(function(userId, fieldNames) { const user = Users.findOne({ _id: userId }); - if (user && user.isAdmin || Meteor.user() && Meteor.user().isAdmin) { return true; } - if (!user) { return false; } - if (_.contains(fieldNames, 'services')) { return false; } - if (_.contains(fieldNames, 'heartBeat')) { return false; } - if (_.contains(fieldNames, 'isAdmin')) { return false; } - if (_.contains(fieldNames, 'loginDisabled')) { return false; } - if (_.contains(fieldNames, 'authenticationMethod')) { return false; } + if ((user && user.isAdmin) || (Meteor.user() && Meteor.user().isAdmin)) { + return true; + } + if (!user) { + return false; + } + if (_.contains(fieldNames, 'services')) { + return false; + } + if (_.contains(fieldNames, 'heartBeat')) { + return false; + } + if (_.contains(fieldNames, 'isAdmin')) { + return false; + } + if (_.contains(fieldNames, 'loginDisabled')) { + return false; + } + if (_.contains(fieldNames, 'authenticationMethod')) { + return false; + } }); Users.allow({ update(userId, doc) { - const user = Users.findOne({ _id: userId }); - if (user && user.isAdmin || Meteor.user() && Meteor.user().isAdmin) return true; - if (!user) { return false; } - return doc._id === userId; + const user = Users.findOne({ _id: userId }); + if ((user && user.isAdmin) || (Meteor.user() && Meteor.user().isAdmin)) + return true; + if (!user) { + return false; + } + return doc._id === userId; }, remove(userId, doc) { const adminsNumber = Users.find({ isAdmin: true }).count(); diff --git a/package.json b/package.json index b4b2285f..d62ef4ac 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "wekan", - "version": "v3.21.0", + "version": "v3.22.0", "description": "Open-Source kanban", "private": true, "scripts": { diff --git a/public/api/wekan.html b/public/api/wekan.html index 9c2a992d..1deb1da4 100644 --- a/public/api/wekan.html +++ b/public/api/wekan.html @@ -1524,7 +1524,7 @@ var n=this.pipeline.run(e.tokenizer(t)),r=new e.Vector,i=[],o=this._fields.reduc <ul class="toc-list-h1"> <li> - <a href="#wekan-rest-api" class="toc-h1 toc-link" data-title="Wekan REST API v3.20">Wekan REST API v3.20</a> + <a href="#wekan-rest-api" class="toc-h1 toc-link" data-title="Wekan REST API v3.21">Wekan REST API v3.21</a> </li> @@ -2017,7 +2017,7 @@ var n=this.pipeline.run(e.tokenizer(t)),r=new e.Vector,i=[],o=this._fields.reduc <div class="page-wrapper"> <div class="dark-box"></div> <div class="content"> - <h1 id="wekan-rest-api">Wekan REST API v3.20</h1> + <h1 id="wekan-rest-api">Wekan REST API v3.21</h1> <blockquote> <p>Scroll down for code samples, example requests and responses. Select a language for code samples from the tabs above or the mobile navigation menu.</p> </blockquote> diff --git a/public/api/wekan.yml b/public/api/wekan.yml index 1c8cc611..d5c0574e 100644 --- a/public/api/wekan.yml +++ b/public/api/wekan.yml @@ -1,7 +1,7 @@ swagger: '2.0' info: title: Wekan REST API - version: v3.20 + version: v3.21 description: | The REST API allows you to control and extend Wekan with ease. diff --git a/sandstorm-pkgdef.capnp b/sandstorm-pkgdef.capnp index 75ac12fb..81b2d9b7 100644 --- a/sandstorm-pkgdef.capnp +++ b/sandstorm-pkgdef.capnp @@ -22,10 +22,10 @@ const pkgdef :Spk.PackageDefinition = ( appTitle = (defaultText = "Wekan"), # The name of the app as it is displayed to the user. - appVersion = 323, + appVersion = 324, # Increment this for every release. - appMarketingVersion = (defaultText = "3.21.0~2019-08-16"), + appMarketingVersion = (defaultText = "3.22.0~2019-08-20"), # Human-readable presentation of the app version. minUpgradableAppVersion = 0, |