diff --git a/routers/repo/blockchain.go b/routers/repo/blockchain.go index e487f1dcf..33129d7e4 100755 --- a/routers/repo/blockchain.go +++ b/routers/repo/blockchain.go @@ -24,16 +24,7 @@ const ( tplBlockChainIndex base.TplName = "repo/blockchain/index" ) -// MustEnableDataset check if repository enable internal cb -func MustEnableBlockChain(ctx *context.Context) { - if !ctx.Repo.CanRead(models.UnitTypeBlockChain) { - ctx.NotFound("MustEnableBlockChain", nil) - return - } -} - func BlockChainIndex(ctx *context.Context) { - //MustEnableBlockChain(ctx) repo := ctx.Repo.Repository if repo.ContractAddress == "" || ctx.User.PublicKey == ""{ log.Error("the repo(%d) or the user(%d) has not been initialized in block_chain", repo.RepoID, ctx.User.ID) diff --git a/routers/routes/routes.go b/routers/routes/routes.go index 67186ccd2..8831e20a5 100755 --- a/routers/routes/routes.go +++ b/routers/routes/routes.go @@ -568,7 +568,7 @@ func RegisterRoutes(m *macaron.Macaron) { reqRepoDatasetWriter := context.RequireRepoWriter(models.UnitTypeDatasets) reqRepoCloudBrainReader := context.RequireRepoReader(models.UnitTypeCloudBrain) reqRepoCloudBrainWriter := context.RequireRepoWriter(models.UnitTypeCloudBrain) - reqRepoBlockChainReader := context.RequireRepoReader(models.UnitTypeBlockChain) + //reqRepoBlockChainReader := context.RequireRepoReader(models.UnitTypeBlockChain) //reqRepoBlockChainWriter := context.RequireRepoWriter(models.UnitTypeBlockChain) // ***** START: Organization ***** @@ -914,7 +914,7 @@ func RegisterRoutes(m *macaron.Macaron) { }, context.RepoRef()) m.Group("/blockchain", func() { - m.Get("", reqRepoBlockChainReader, repo.BlockChainIndex) + m.Get("", repo.BlockChainIndex) }, context.RepoRef()) m.Group("/wiki", func() {