diff --git a/api/portainer.go b/api/portainer.go index 4e27cf940..ac5cda1a1 100644 --- a/api/portainer.go +++ b/api/portainer.go @@ -611,7 +611,7 @@ type ( const ( // APIVersion is the version number of the Portainer API. - APIVersion = "1.19.0" + APIVersion = "1.19.1" // DBVersion is the version number of the Portainer database. DBVersion = 13 // PortainerAgentHeader represents the name of the header available in any agent response diff --git a/api/swagger.yaml b/api/swagger.yaml index e8a562ff6..0e4e9426c 100644 --- a/api/swagger.yaml +++ b/api/swagger.yaml @@ -54,7 +54,7 @@ info: **NOTE**: You can find more information on how to query the Docker API in the [Docker official documentation](https://docs.docker.com/engine/api/v1.30/) as well as in [this Portainer example](https://gist.github.com/deviantony/77026d402366b4b43fa5918d41bc42f8). - version: "1.19.0" + version: "1.19.1" title: "Portainer API" contact: email: "info@portainer.io" @@ -2816,7 +2816,7 @@ definitions: description: "Is analytics enabled" Version: type: "string" - example: "1.19.0" + example: "1.19.1" description: "Portainer API version" PublicSettingsInspectResponse: type: "object" diff --git a/app/portainer/views/auth/authController.js b/app/portainer/views/auth/authController.js index 3642bbf26..90d5e85a2 100644 --- a/app/portainer/views/auth/authController.js +++ b/app/portainer/views/auth/authController.js @@ -15,7 +15,7 @@ function ($scope, $state, $transition$, $sanitize, Authentication, UserService, function unauthenticatedFlow() { EndpointService.endpoints() - .then(function success(data) { + .then(function success(endpoints) { if (endpoints.length === 0) { $state.go('portainer.init.endpoint'); } else { diff --git a/app/portainer/views/home/home.html b/app/portainer/views/home/home.html index d7190ef63..1ffae5f9e 100644 --- a/app/portainer/views/home/home.html +++ b/app/portainer/views/home/home.html @@ -30,7 +30,7 @@ title-text="Endpoints" title-icon="fa-plug" endpoints="endpoints" dashboard-action="goToDashboard" - show-snapshot-action="isAdmin" + show-snapshot-action="!applicationState.application.authentication || isAdmin" snapshot-action="triggerSnapshot" > diff --git a/app/portainer/views/sidebar/sidebarController.js b/app/portainer/views/sidebar/sidebarController.js index e1a14b02d..7d685ac29 100644 --- a/app/portainer/views/sidebar/sidebarController.js +++ b/app/portainer/views/sidebar/sidebarController.js @@ -16,17 +16,20 @@ function ($q, $scope, StateManager, Notifications, Authentication, UserService) $scope.uiVersion = StateManager.getState().application.version; $scope.logo = StateManager.getState().application.logo; - var userDetails = Authentication.getUserDetails(); - var isAdmin = userDetails.role === 1; - $scope.isAdmin = isAdmin; + var authenticationEnabled = $scope.applicationState.application.authentication; + if (authenticationEnabled) { + var userDetails = Authentication.getUserDetails(); + var isAdmin = userDetails.role === 1; + $scope.isAdmin = isAdmin; - $q.when(!isAdmin ? UserService.userMemberships(userDetails.ID) : []) - .then(function success(data) { - checkPermissions(data); - }) - .catch(function error(err) { - Notifications.error('Failure', err, 'Unable to retrieve user memberships'); - }); + $q.when(!isAdmin ? UserService.userMemberships(userDetails.ID) : []) + .then(function success(data) { + checkPermissions(data); + }) + .catch(function error(err) { + Notifications.error('Failure', err, 'Unable to retrieve user memberships'); + }); + } } initView(); diff --git a/build.sh b/build.sh index e8d603292..36e86b8a9 100755 --- a/build.sh +++ b/build.sh @@ -14,7 +14,7 @@ function build_and_push_images() { function build_archive() { BUILD_FOLDER="${ARCHIVE_BUILD_FOLDER}/$1" rm -rf ${BUILD_FOLDER} && mkdir -pv ${BUILD_FOLDER}/portainer - mv dist/* ${BUILD_FOLDER}/portainer/ + cp -r dist/* ${BUILD_FOLDER}/portainer/ cd ${BUILD_FOLDER} tar cvpfz "portainer-${VERSION}-$1.tar.gz" portainer mv "portainer-${VERSION}-$1.tar.gz" ${ARCHIVE_BUILD_FOLDER}/ diff --git a/distribution/portainer.spec b/distribution/portainer.spec index 41de878c5..65f1b8baf 100644 --- a/distribution/portainer.spec +++ b/distribution/portainer.spec @@ -1,5 +1,5 @@ Name: portainer -Version: 1.19.0 +Version: 1.19.1 Release: 0 License: Zlib Summary: A lightweight docker management UI diff --git a/gruntfile.js b/gruntfile.js index 7337b128d..217ddc041 100644 --- a/gruntfile.js +++ b/gruntfile.js @@ -31,7 +31,6 @@ module.exports = function (grunt) { 'clean:all', 'before-copy', 'copy:assets', - 'copy:templates', 'after-copy' ]); grunt.registerTask('build', [ @@ -82,6 +81,7 @@ module.exports = function (grunt) { root: 'dist', distdir: 'dist/public', shippedDockerVersion: '18.03.1-ce', + shippedDockerVersionWindows: '17.09.0-ce', pkg: grunt.file.readJSON('package.json'), config: gruntfile_cfg.config, src: gruntfile_cfg.src, @@ -122,7 +122,7 @@ gruntfile_cfg.src = { }; gruntfile_cfg.clean = { - all: ['<%= distdir %>/../*'], + all: ['<%= root %>/*'], app: ['<%= distdir %>/*', '!<%= distdir %>/../portainer*', '!<%= distdir %>/../docker*'], tmpl: ['<%= distdir %>/templates'], tmp: ['<%= distdir %>/js/*', '!<%= distdir %>/js/app.*.js', '<%= distdir %>/css/*', '!<%= distdir %>/css/app.*.css'] @@ -163,12 +163,8 @@ gruntfile_cfg.copy = { {dest: '<%= distdir %>/fonts/', src: '*.{ttf,woff,woff2,eof,eot,svg}', expand: true, cwd: 'node_modules/@fortawesome/fontawesome-free-webfonts/webfonts/'}, {dest: '<%= distdir %>/fonts/', src: '*.{ttf,woff,woff2,eof,svg}', expand: true, cwd: 'node_modules/rdash-ui/dist/fonts/'}, {dest: '<%= distdir %>/images/', src: '**', expand: true, cwd: 'assets/images/'}, - {dest: '<%= distdir %>/ico', src: '**', expand: true, cwd: 'assets/ico'} - ] - }, - templates: { - files: [ - { dest: '<%= root %>/', src: 'templates.json', cwd: '' } + {dest: '<%= distdir %>/ico', src: '**', expand: true, cwd: 'assets/ico'}, + {dest: '<%= root %>/', src: 'templates.json', cwd: ''} ] } }; @@ -285,11 +281,12 @@ function shell_downloadDockerBinary(p, a) { var as = { 'amd64': 'x86_64', 'arm': 'armhf', 'arm64': 'aarch64' }; var ip = ((ps[p] === undefined) ? p : ps[p]); var ia = ((as[a] === undefined) ? a : as[a]); + var binaryVersion = (( p === 'win' ? '<%= shippedDockerVersionWindows %>' : '<%= shippedDockerVersion %>' )); return [ 'if [ -f '+(( p === 'win' ) ? 'dist/docker.exe' : 'dist/docker')+' ]; then', 'echo "Docker binary exists";', 'else', - 'build/download_docker_binary.sh ' + ip + ' ' + ia + ' <%= shippedDockerVersion %>;', + 'build/download_docker_binary.sh ' + ip + ' ' + ia + ' ' + binaryVersion + ';', 'fi' ].join(' '); } diff --git a/package.json b/package.json index a6619e4af..0cb5e3b7b 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "author": "Portainer.io", "name": "portainer", "homepage": "http://portainer.io", - "version": "1.19.0", + "version": "1.19.1", "repository": { "type": "git", "url": "git@github.com:portainer/portainer.git"