Browse Source

normal user cannot add store

HEAD
Yang Luo 3 years ago
parent
commit
d6f02fc2b9
2 changed files with 11 additions and 2 deletions
  1. +6
    -1
      storage/aliyun.go
  2. +5
    -1
      web/src/StoreListPage.js

+ 6
- 1
storage/aliyun.go View File

@@ -21,9 +21,14 @@ func getBucket(bucketName string) *oss.Bucket {
}

func ListObjects(bucketName string, prefix string) []oss.ObjectProperties {
res := []oss.ObjectProperties{}

if bucketName == "" {
return res
}

bucket := getBucket(bucketName)

res := []oss.ObjectProperties{}
marker := oss.Marker("")
i := 0
for {


+ 5
- 1
web/src/StoreListPage.js View File

@@ -125,7 +125,11 @@ class StoreListPage extends React.Component {
title={() => (
<div>
{i18next.t("general:Stores")}&nbsp;&nbsp;&nbsp;&nbsp;
<Button type="primary" size="small" onClick={this.addStore.bind(this)}>{i18next.t("general:Add")}</Button>
{
!Setting.isLocalAdminUser(this.props.account) ? null : (
<Button type="primary" size="small" onClick={this.addStore.bind(this)}>{i18next.t("general:Add")}</Button>
)
}
</div>
)}
loading={stores === null}


Loading…
Cancel
Save