Skip to content

[fix][foundation]: authRes slice contain a nil item#100

Merged
cyang302 merged 1 commit into
coze-dev:mainfrom
watwatpropro:fix/authResSlice
Aug 13, 2025
Merged

[fix][foundation]: authRes slice contain a nil item#100
cyang302 merged 1 commit into
coze-dev:mainfrom
watwatpropro:fix/authResSlice

Conversation

@watwatpropro
Copy link
Copy Markdown
Contributor

@watwatpropro watwatpropro commented Aug 13, 2025

Change-Id: Id4d8d1809f35c77291de793175750156493917a9

What type of PR is this?

fix: fix authRes slice contain a empty item

old way
authRes := make([]*authModel.SubjectActionObjectAuthRes, len(request.Auths)) for _, authObject := range request.Auths { isAllowed := true for _, object := range authObject.Objects { if object.SpaceID != nil && object.GetSpaceID() != strconv.FormatInt(spaceID, 10) { isAllowed = false break } } authRes = append(authRes, &authModel.SubjectActionObjectAuthRes{ SubjectActionObjects: authObject, IsAllowed: ptr.Of(isUserSpace && isAllowed), }) }

Initialization method for the first row, would set a nil item to authRes

Check the PR title.

[fix][backend] fix authRes slice contain a empty item

Change-Id: Id4d8d1809f35c77291de793175750156493917a9
@CLAassistant
Copy link
Copy Markdown

CLAassistant commented Aug 13, 2025

CLA assistant check
All committers have signed the CLA.

@cyang302 cyang302 changed the title FIX: authRes slice contain a nil item [fix][foundation]: authRes slice contain a nil item Aug 13, 2025
@cyang302 cyang302 merged commit 42a2efe into coze-dev:main Aug 13, 2025
6 of 8 checks passed
wsx864321 pushed a commit to wsx864321/coze-loop that referenced this pull request Aug 19, 2025
FIX: authRes slice contain a nil item

Change-Id: Id4d8d1809f35c77291de793175750156493917a9
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants