Skip to content

Feature/8960 compute active users and N°7060 - create ReadOnly profiles#935

Open
jf-cbd wants to merge 22 commits into
developfrom
feature/8960-compute-active-users
Open

Feature/8960 compute active users and N°7060 - create ReadOnly profiles#935
jf-cbd wants to merge 22 commits into
developfrom
feature/8960-compute-active-users

Conversation

@jf-cbd

@jf-cbd jf-cbd commented Jun 10, 2026

Copy link
Copy Markdown
Member

Base information

Question Answer
Related to a SourceForge thread / Another PR / A GitHub Issue / Combodo ticket? N°7060
Type of change? Enhancement

Symptom (bug) / Objective (enhancement)

It also introduces new Read Only profiles.

Proposed solution (bug and enhancement)

  • define new profiles
  • write tests

Checklist before requesting a review

  • I have performed a self-review of my code
  • I have tested all changes I made on an iTop instance
  • I have added a unit test, otherwise I have explained why I couldn't
  • Is the PR clear and detailed enough so anyone can understand without digging in the code?

@greptile-apps

greptile-apps Bot commented Jun 10, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR adds user counting support and new read-only profiles. The main changes are:

  • New Configuration, Ticket, and Service Catalog read-only profiles.
  • A new ITopUserCountingRepository for user category counts.
  • Dictionary labels and Composer autoload entries for the repository.
  • Unit-test helpers and tests for user rights and counting behavior.

Confidence Score: 2/5

This should be fixed before merging.

  • User counts can overlap or omit users in realistic category combinations.
  • Calling the read-only count can clear the current user session context.
  • The Service Catalog ReadOnly profile grants access to contract data beyond the stated scope.

sources/Users/ITopUserCountingRepository.php and datamodels/2.x/itop-profiles-itil/datamodel.itop-profiles-itil.xml need the main fixes.

Security Review

  • Data exposure: datamodels/2.x/itop-profiles-itil/datamodel.itop-profiles-itil.xml grants Service Catalog ReadOnly users access to contract classes through the broad Service group.

Important Files Changed

Filename Overview
sources/Users/ITopUserCountingRepository.php Adds the main user counting logic, with category overlap, missing-category, and session side-effect issues.
datamodels/2.x/itop-profiles-itil/datamodel.itop-profiles-itil.xml Adds read-only profiles, with ticket relation coverage gaps and broad service/contract exposure.

Reviews (1): Last reviewed commit: "Remove assertion in test" | Re-trigger Greptile

Comment thread sources/Users/ITopUserCountingRepository.php Outdated
Comment thread sources/Users/ITopUserCountingRepository.php Outdated
Comment thread sources/Users/ITopUserCountingRepository.php Outdated
Comment thread sources/Users/ITopUserCountingRepository.php Outdated
Comment thread sources/Users/ITopUserCountingRepository.php Outdated
Comment thread sources/Users/ITopUserCountingRepository.php Outdated
Comment thread datamodels/2.x/itop-profiles-itil/datamodel.itop-profiles-itil.xml
Comment thread datamodels/2.x/itop-profiles-itil/datamodel.itop-profiles-itil.xml
@jf-cbd jf-cbd force-pushed the feature/8960-compute-active-users branch from 57d4e4c to fd5954d Compare June 11, 2026 15:56
@jf-cbd jf-cbd force-pushed the feature/8960-compute-active-users branch from fd5954d to 9c5bef0 Compare June 12, 2026 07:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

internal Work made by Combodo

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants