Skip to content
This repository has been archived by the owner on Feb 18, 2021. It is now read-only.

Add AddPermission to AuthManager #221

Merged
merged 9 commits into from
Jun 14, 2017
Merged

Add AddPermission to AuthManager #221

merged 9 commits into from
Jun 14, 2017

Conversation

hiboyang
Copy link
Contributor

No description provided.

@hiboyang hiboyang requested review from datoug, thuningxu and kirg June 12, 2017 22:40
# Conflicts:
#	common/auth_util.go
#	common/auth_util_test.go
#	services/frontendhost/frontend.go
@coveralls
Copy link

Coverage Status

Changes Unknown when pulling ad7b941 on security12 into ** on master**.

@coveralls
Copy link

Coverage Status

Changes Unknown when pulling 13ab151 on security12 into ** on master**.

@coveralls
Copy link

Coverage Status

Changes Unknown when pulling 22a77ac on security12 into ** on master**.

@@ -67,6 +68,25 @@ func GetResourceURNCreateConsumerGroup(scommon SCommon, cgPath *string) string {
return fmt.Sprintf(resourceURNTemplateCreateConsumerGroup, getTenancyLowerCase(scommon), strings.ToLower(cgPathString))
}

// GetResourceURNOperateConsumerGroup returns the resource URN to operate consumer group (read, delete), e.g. urn:cherami:dst:zone1_prod:/cg_prefix/cg1
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

update comment: urn:cherami:cg:zone1_prod

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch!

@@ -647,6 +647,12 @@ func (h *Frontend) CreateDestination(ctx thrift.Context, createRequest *c.Create
return nil, err
}

dstResource := common.GetResourceURNOperateDestination(h.SCommon, createRequest.Path)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you add a comment regarding this section?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes

common.TagSubject: authSubject,
common.TagResource: authResource,
common.TagOperation: operation,
}).Info("Failed to add permission")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

change this to error log?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.2%) to 68.221% when pulling 16bc0c8 on security12 into 7b84ef5 on master.

@hiboyang hiboyang merged commit f69bc09 into master Jun 14, 2017
@hiboyang hiboyang deleted the security12 branch June 14, 2017 19:34
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants