diff --git a/browser/app/js/buckets/Policy.js b/browser/app/js/buckets/Policy.js
index 2256a9ae5..2de8d8ca8 100644
--- a/browser/app/js/buckets/Policy.js
+++ b/browser/app/js/buckets/Policy.js
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-import { READ_ONLY, WRITE_ONLY, READ_WRITE } from '../constants'
+import { READ_ONLY, WRITE_ONLY, READ_WRITE, NONE } from '../constants'
import React from "react"
import { connect } from "react-redux"
@@ -42,37 +42,40 @@ export class Policy extends React.Component {
render() {
const {policy, prefix} = this.props
let newPrefix = prefix
-
if (newPrefix === '')
newPrefix = '*'
- return (
-
-
- { newPrefix }
+ if (policy === NONE) {
+ return
+ } else {
+ return (
+
+
+ { newPrefix }
+
+
+
+
+
+
+
-
-
-
-
-
-
-
- )
+ )
+ }
}
}
diff --git a/browser/app/js/buckets/__tests__/Policy.test.js b/browser/app/js/buckets/__tests__/Policy.test.js
index 52d34fcd2..12895b34d 100644
--- a/browser/app/js/buckets/__tests__/Policy.test.js
+++ b/browser/app/js/buckets/__tests__/Policy.test.js
@@ -17,7 +17,7 @@
import React from "react"
import { shallow, mount } from "enzyme"
import { Policy } from "../Policy"
-import { READ_ONLY, WRITE_ONLY, READ_WRITE } from "../../constants"
+import { READ_ONLY, WRITE_ONLY, READ_WRITE, NONE } from "../../constants"
import web from "../../web"
jest.mock("../../web", () => ({
@@ -31,6 +31,11 @@ describe("Policy", () => {
shallow(
)
})
+ it("should not render when policy is listed as 'none'", () => {
+ const wrapper = shallow(
)
+ expect(wrapper.find(".pmb-list").length).toBe(0)
+ })
+
it("should call web.setBucketPolicy and fetchPolicies on submit", () => {
const fetchPolicies = jest.fn()
const wrapper = shallow(
diff --git a/browser/app/js/constants.js b/browser/app/js/constants.js
index 310b959a1..569029665 100644
--- a/browser/app/js/constants.js
+++ b/browser/app/js/constants.js
@@ -23,6 +23,7 @@ export const minioBrowserPrefix = p.slice(0, p.indexOf("/", 1))
export const READ_ONLY = "readonly"
export const WRITE_ONLY = "writeonly"
export const READ_WRITE = "readwrite"
+export const NONE = "none"
export const SHARE_OBJECT_EXPIRY_DAYS = 5
export const SHARE_OBJECT_EXPIRY_HOURS = 0
diff --git a/browser/ui-assets.go b/browser/ui-assets.go
index d7d989dd3..036d935bf 100644
--- a/browser/ui-assets.go
+++ b/browser/ui-assets.go
@@ -4,7 +4,7 @@
// production/favicon.ico
// production/firefox.png
// production/index.html
-// production/index_bundle-2018-08-07T17-56-44Z.js
+// production/index_bundle-2018-08-24T02-51-30Z.js
// production/loader.css
// production/logo.svg
// production/safari.png
@@ -14,7 +14,6 @@ package browser
import (
"fmt"
- "github.com/elazarl/go-bindata-assetfs"
"io/ioutil"
"os"
"path/filepath"
@@ -65,7 +64,7 @@ func productionChromePng() (*asset, error) {
return nil, err
}
- info := bindataFileInfo{name: "production/chrome.png", size: 3726, mode: os.FileMode(420), modTime: time.Unix(1533664621, 0)}
+ info := bindataFileInfo{name: "production/chrome.png", size: 3726, mode: os.FileMode(420), modTime: time.Unix(1535079106, 0)}
a := &asset{bytes: bytes, info: info}
return a, nil
}
@@ -82,7 +81,7 @@ func productionFaviconIco() (*asset, error) {
return nil, err
}
- info := bindataFileInfo{name: "production/favicon.ico", size: 501, mode: os.FileMode(420), modTime: time.Unix(1533664621, 0)}
+ info := bindataFileInfo{name: "production/favicon.ico", size: 501, mode: os.FileMode(420), modTime: time.Unix(1535079106, 0)}
a := &asset{bytes: bytes, info: info}
return a, nil
}
@@ -99,7 +98,7 @@ func productionFirefoxPng() (*asset, error) {
return nil, err
}
- info := bindataFileInfo{name: "production/firefox.png", size: 4795, mode: os.FileMode(420), modTime: time.Unix(1533664621, 0)}
+ info := bindataFileInfo{name: "production/firefox.png", size: 4795, mode: os.FileMode(420), modTime: time.Unix(1535079106, 0)}
a := &asset{bytes: bytes, info: info}
return a, nil
}
@@ -156,8 +155,8 @@ var _productionIndexHTML = []byte(`
-
-
+
+