Skip to content

Commit

Permalink
📝 Added the Confluence Restriction doc's links
Browse files Browse the repository at this point in the history
  • Loading branch information
ctreminiom committed Jan 19, 2022
1 parent ffd23e1 commit 2f787c0
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 0 deletions.
4 changes: 4 additions & 0 deletions confluence/contentRestriction.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ type ContentRestrictionService struct {
}

// Gets returns the restrictions on a piece of content.
// Docs: https://docs.go-atlassian.io/confluence-cloud/content/restrictions#get-restrictions
func (c *ContentRestrictionService) Gets(ctx context.Context, contentID string, expand []string, startAt, maxResults int) (
result *models.ContentRestrictionPageScheme, response *ResponseScheme, err error) {

Expand Down Expand Up @@ -49,6 +50,7 @@ func (c *ContentRestrictionService) Gets(ctx context.Context, contentID string,
}

// Add adds restrictions to a piece of content. Note, this does not change any existing restrictions on the content.
// Docs: https://docs.go-atlassian.io/confluence-cloud/content/restrictions#add-restrictions
func (c *ContentRestrictionService) Add(ctx context.Context, contentID string, payload *models.ContentRestrictionUpdatePayloadScheme,
expand []string) (result *models.ContentRestrictionPageScheme, response *ResponseScheme, err error) {

Expand Down Expand Up @@ -90,6 +92,7 @@ func (c *ContentRestrictionService) Add(ctx context.Context, contentID string, p
}

// Delete removes all restrictions (read and update) on a piece of content.
// Docs: https://docs.go-atlassian.io/confluence-cloud/content/restrictions#delete-restrictions
func (c *ContentRestrictionService) Delete(ctx context.Context, contentID string, expand []string) (
result *models.ContentRestrictionPageScheme, response *ResponseScheme, err error) {

Expand Down Expand Up @@ -125,6 +128,7 @@ func (c *ContentRestrictionService) Delete(ctx context.Context, contentID string
}

// Update updates restrictions for a piece of content. This removes the existing restrictions and replaces them with the restrictions in the request.
// Docs: https://docs.go-atlassian.io/confluence-cloud/content/restrictions#update-restrictions
func (c *ContentRestrictionService) Update(ctx context.Context, contentID string, payload *models.ContentRestrictionUpdatePayloadScheme,
expand []string) (result *models.ContentRestrictionPageScheme, response *ResponseScheme, err error) {

Expand Down
3 changes: 3 additions & 0 deletions confluence/contentRestrictionOperationGroup.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ type ContentRestrictionOperationGroupService struct{ client *Client }
// Get returns whether the specified content restriction applies to a group
// Note that a response of true does not guarantee that the group can view the page,
// as it does not account for account-inherited restrictions, space permissions, or even product access.
// Docs: https://docs.go-atlassian.io/confluence-cloud/content/restrictions/operations/group#get-content-restriction-status-for-group
func (c *ContentRestrictionOperationGroupService) Get(ctx context.Context, contentID, operationKey, groupNameOrID string) (response *ResponseScheme, err error) {

if len(contentID) == 0 {
Expand Down Expand Up @@ -55,6 +56,7 @@ func (c *ContentRestrictionOperationGroupService) Get(ctx context.Context, conte
}

// Add adds a group to a content restriction. That is, grant read or update permission to the group for a piece of content.
// Docs: https://docs.go-atlassian.io/confluence-cloud/content/restrictions/operations/group#add-group-to-content-restriction
func (c *ContentRestrictionOperationGroupService) Add(ctx context.Context, contentID, operationKey, groupNameOrID string) (response *ResponseScheme, err error) {

if len(contentID) == 0 {
Expand Down Expand Up @@ -96,6 +98,7 @@ func (c *ContentRestrictionOperationGroupService) Add(ctx context.Context, conte
}

// Remove removes a group from a content restriction. That is, remove read or update permission for the group for a piece of content.
// Docs: https://docs.go-atlassian.io/confluence-cloud/content/restrictions/operations/group#remove-group-from-content-restriction
func (c *ContentRestrictionOperationGroupService) Remove(ctx context.Context, contentID, operationKey, groupNameOrID string) (response *ResponseScheme, err error) {

if len(contentID) == 0 {
Expand Down
2 changes: 2 additions & 0 deletions confluence/contentRestrictionsOperation.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ type ContentRestrictionOperationService struct {
// Gets returns restrictions on a piece of content by operation.
// This method is similar to Get restrictions except that the operations are properties
// of the return object, rather than items in a results array.
// Docs: https://docs.go-atlassian.io/confluence-cloud/content/restrictions/operations#get-restrictions-by-operation
func (c *ContentRestrictionOperationService) Gets(ctx context.Context, contentID string, expand []string) (
result *models.ContentRestrictionByOperationScheme, response *ResponseScheme, err error) {

Expand Down Expand Up @@ -53,6 +54,7 @@ func (c *ContentRestrictionOperationService) Gets(ctx context.Context, contentID
}

// Get returns the restrictions on a piece of content for a given operation (read or update).
// Docs: https://docs.go-atlassian.io/confluence-cloud/content/restrictions/operations#get-restrictions-for-operation
func (c *ContentRestrictionOperationService) Get(ctx context.Context, contentID, operationKey string, expand []string,
startAt, maxResults int) (result *models.ContentRestrictionScheme, response *ResponseScheme, err error) {

Expand Down

0 comments on commit 2f787c0

Please sign in to comment.