Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/insights reporting bootstrap5 #195

Closed
wants to merge 30 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
7604997
Support for Form Banner
2piJareem Apr 26, 2023
2f709b3
Added suport for horizontal lines on forms
2piJareem May 11, 2023
0c81d37
feat: add support for Node 18 in template build
May 18, 2023
88b2ef0
Updated package-lock.json
2piJareem May 19, 2023
d441ae9
Lastest package-lock.json
2piJareem May 24, 2023
a8c9ac0
Insights Reports Bootstrap5 Initial mods
2piJareem Jun 2, 2023
166cea6
Encoding to UTF-8 for CSV Export
2piJareem Jun 8, 2023
532b518
Working on Conversion to Bootstrap5 PDF Export
2piJareem Jun 9, 2023
d3e2bb9
Manage Groups within Insight reports
2piJareem Jun 23, 2023
7c5b525
Parameter to not display overlay for multicolform
2piJareem Jun 23, 2023
283fe75
Remove Encoding to UTF-8 for CSV Exprt Not requird
2piJareem Jun 28, 2023
9f5faca
Moved dataOverlay functionality after class fnclty
2piJareem Jun 28, 2023
2312fbf
Remove Comment lines
2piJareem Jun 28, 2023
990b654
Neatening code
2piJareem Jun 29, 2023
b2c68e2
Use bootstrap5 object
2piJareem Jun 29, 2023
f4e6ce1
Merge branch 'develop' into feature/InsightsReportingBootstrap5
2piJareem Jul 6, 2023
f092f00
Merge branch 'develop' into feature/InsightsReportingBootstrap5
2piJareem Jul 7, 2023
b15b397
Merge branch 'feature/InsightsReportingBootstrap5' of github.com:2pis…
2piJareem Jul 7, 2023
bee6f20
Removed @import "~bootstrap/scss/maps";
2piJareem Aug 10, 2023
235589c
Removed ref to "~bootstrap/scss/maps"
2piJareem Aug 16, 2023
9ce5e63
Merge remote-tracking branch 'origin/feature/InsightsReportingBootstr…
2piJareem Aug 16, 2023
18fc62b
Merge branch 'develop' into feature/InsightsReportingBootstrap5
2piJareem Aug 16, 2023
40693f8
Merge branch 'develop' into feature/InsightsReportingBootstrap5
Mar 1, 2024
cf16ab9
fix: tidy up code
Mar 1, 2024
fc9b8cd
fix: tidy up code
Mar 1, 2024
8455d9a
fix: update package-lock.json
Mar 1, 2024
e5166ea
Merge remote-tracking branch 'origin/develop' into feature/InsightsRe…
Mar 18, 2024
2b834c9
Merge branch 'develop' into feature/InsightsReportingBootstrap5
adam-buckley Jul 29, 2024
42f5cec
fix: fix merge conflicts
Aug 1, 2024
6ba25a2
fix: unignore package-lock.json
Aug 1, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions system/modules/auth/models/AuthService.php
Original file line number Diff line number Diff line change
Expand Up @@ -509,6 +509,7 @@ public function getGroups()

public function getGroupMembers($group_id = null, $user_id = null)
{
$option = [];
if ($group_id) {
$option['group_id'] = $group_id;
}
Expand Down
18 changes: 18 additions & 0 deletions system/modules/insights/models/InsightService.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,24 @@

class InsightService extends DbService
{
// Function to recursively check if a user is a member of a group (or parent group)
function checkUserAccess($group, $user_id): bool
{
$groupMembers = AuthService::getInstance($this->w)->getGroupMembers($group);
if (!empty($groupMembers)) {
foreach ($groupMembers as $groupMember) {
if ($groupMember->user_id === $user_id) {
return true;
} elseif (AuthService::getInstance($this->w)->getUser($groupMember->user_id)->is_group) {
if ($this->checkUserAccess($groupMember->user_id, $user_id)) {
return true;
}
}
}
}
return false;
}

// returns all insight instances
public function getAllInsights($insights)
{
Expand Down
Loading