Skip to content

Conversation

@HocKu7
Copy link
Contributor

@HocKu7 HocKu7 commented Oct 15, 2025

Comment on lines 180 to 195
async deleteProjectSettings(projectId: string, settingIds: string[], subjectId?: string): Promise<void> {
if (subjectId) {
await this.graphQLService.sdk.adminDeleteUserProjectSettings({
projectId,
subjectId,
settingIds,
});
} else {
await this.graphQLService.sdk.deleteUserProjectSettings({
projectId,
settingIds,
});
}

this.markOutdated(projectId);
}
Copy link
Contributor

Choose a reason for hiding this comment

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

it is not in use yet. may be delete it?

Comment on lines 150 to 161
getProjectSettings(projectId: string, subjectId?: string) {
if (subjectId) {
return this.graphQLService.sdk.getAdminUserProjectSettings({
projectId,
subjectId,
});
} else {
return this.graphQLService.sdk.getUserProjectSettings({
projectId,
});
}
}
Copy link
Contributor

Choose a reason for hiding this comment

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

does it work for users?

I can see this in constructor which means this resource only available for an admin
sessionPermissionsResource.require(this, EAdminPermission.admin);

Copy link
Contributor

Choose a reason for hiding this comment

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

Probably better to split into two resources
But user one is not gonna be in use, so maybe we just simplty delete the user part

rmUserProjectSettings(projectId: ID!): Object @since(version: "25.2.1")

"Returns project settings that are specified for a subject"
rmAdminUserProjectSettings(projectId: ID!, subjectId: String!): Object @since(version: "25.2.3")
Copy link
Member

Choose a reason for hiding this comment

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

maybe rmAdminDefaultProjectSettings?

});
}

this.markOutdated(projectId);
Copy link
Member

Choose a reason for hiding this comment

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

you don't need to mark data as outdated, you can use returned information to update changed data

Copy link
Contributor

Choose a reason for hiding this comment

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

Sorry I don't see what we should update here.

Copy link
Member

Choose a reason for hiding this comment

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

hm, this is because you don't cache project settings, so you have two options:

  1. remove markOutdated because RMProject type not changed so we don't need to reset cache for it
  2. create separate resource for project settings

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.

4 participants