Skip to content

Commit

Permalink
implement review remarks
Browse files Browse the repository at this point in the history
  • Loading branch information
David Christofas committed Jan 19, 2022
1 parent cc9def0 commit 525b300
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion internal/grpc/services/gateway/gateway.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ type config struct {
GroupProviderEndpoint string `mapstructure:"groupprovidersvc"`
DataTxEndpoint string `mapstructure:"datatx"`
DataGatewayEndpoint string `mapstructure:"datagateway"`
PermissionsEndpoint string `mapstructure:"permissionssvc"`
CommitShareToStorageGrant bool `mapstructure:"commit_share_to_storage_grant"`
CommitShareToStorageRef bool `mapstructure:"commit_share_to_storage_ref"`
DisableHomeCreationOnLogin bool `mapstructure:"disable_home_creation_on_login"`
Expand All @@ -71,7 +72,6 @@ type config struct {
EtagCacheTTL int `mapstructure:"etag_cache_ttl"`
AllowedUserAgents map[string][]string `mapstructure:"allowed_user_agents"` // map[path][]user-agent
CreateHomeCacheTTL int `mapstructure:"create_home_cache_ttl"`
PermissionsEndpoint string `mapstructure:"permissionssvc"`
}

// sets defaults
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
// granted to it by virtue of its status as an Intergovernmental Organization
// or submit itself to any jurisdiction.

package ocisci
package demo

import (
provider "github.com/cs3org/go-cs3apis/cs3/storage/provider/v1beta1"
Expand All @@ -25,10 +25,10 @@ import (
)

func init() {
registry.Register("ocisci", New)
registry.Register("demo", New)
}

// New returns a new permission manager specific for the CI
// New returns a new demo permission manager
func New(c map[string]interface{}) (permission.Manager, error) {
return manager{}, nil
}
Expand All @@ -37,7 +37,7 @@ type manager struct {
}

func (m manager) CheckPermission(permission string, subject string, ref *provider.Reference) bool {
// We can currently return false all the time.
// We can currently return true all the time.
// Once we beginn testing roles we need to somehow check the roles of the users here
return false
return true
}
2 changes: 1 addition & 1 deletion pkg/permission/manager/loader/loader.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,6 @@ package loader

import (
// Load permission manager drivers
_ "github.com/cs3org/reva/pkg/permission/manager/ocisci"
_ "github.com/cs3org/reva/pkg/permission/manager/demo"
// Add your own here
)

0 comments on commit 525b300

Please sign in to comment.