Skip to content

Commit

Permalink
stat as a root
Browse files Browse the repository at this point in the history
  • Loading branch information
gmgigi96 committed Oct 25, 2022
1 parent 4a70172 commit 81ce7b3
Showing 1 changed file with 2 additions and 18 deletions.
20 changes: 2 additions & 18 deletions pkg/storage/utils/eosfs/eosfs.go
Original file line number Diff line number Diff line change
Expand Up @@ -1188,23 +1188,7 @@ func (fs *eosfs) GetMD(ctx context.Context, ref *provider.Reference, mdKeys []st
log := appctx.GetLogger(ctx)
log.Info().Msg("eosfs: get md for ref:" + ref.String())

u, err := getUser(ctx)
if err != nil {
return nil, err
}

fn := ""
if u.Id.Type == userpb.UserType_USER_TYPE_LIGHTWEIGHT ||
u.Id.Type == userpb.UserType_USER_TYPE_FEDERATED {
p, err := fs.resolve(ctx, ref)
if err != nil {
return nil, errors.Wrap(err, "eosfs: error resolving reference")
}

fn = fs.wrap(ctx, p)
}

auth, err := fs.getUserAuth(ctx, u, fn)
auth, err := fs.getRootAuth(ctx)
if err != nil {
return nil, err
}
Expand All @@ -1231,7 +1215,7 @@ func (fs *eosfs) GetMD(ctx context.Context, ref *provider.Reference, mdKeys []st
}
}

fn = fs.wrap(ctx, p)
fn := fs.wrap(ctx, p)
eosFileInfo, err := fs.c.GetFileInfoByPath(ctx, auth, fn)
if err != nil {
return nil, err
Expand Down

0 comments on commit 81ce7b3

Please sign in to comment.