Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
266 commits
Select commit Hold shift + click to select a range
d3cf742
fix issue #848
oyeaussie Jun 25, 2026
3b6767b
update #848
oyeaussie Jun 25, 2026
f312bd2
fix issue #850
oyeaussie Jun 25, 2026
41806e3
update #851
oyeaussie Jun 26, 2026
64ed526
update #544
oyeaussie Jun 26, 2026
96f61bb
cleanup #851
oyeaussie Jun 26, 2026
1d79ee7
update #847
oyeaussie Jun 26, 2026
fac32b0
initial commit #701
oyeaussie Jun 26, 2026
6b87f62
update #701 - Added extraction for geo data and dictionary data
oyeaussie Jun 27, 2026
40f504f
update #847
oyeaussie Jun 27, 2026
4262298
fix issue #852
oyeaussie Jun 27, 2026
9022d61
initial commit #853
oyeaussie Jun 27, 2026
d98f9a0
update #701
oyeaussie Jun 27, 2026
7247280
update #701 ip2location downloads
oyeaussie Jun 28, 2026
0033a7b
update #701 cleanup
oyeaussie Jun 28, 2026
b3c7033
initial commit #854
oyeaussie Jun 28, 2026
0dfb4c9
update #701 add missing files
oyeaussie Jun 28, 2026
dc95bfb
update #701, all countries data should not include states and timezones.
oyeaussie Jun 28, 2026
8d811f5
update #854
oyeaussie Jun 28, 2026
7ad4710
update #854
oyeaussie Jun 28, 2026
a83110b
update #854
oyeaussie Jun 28, 2026
5fa94bb
update #854
oyeaussie Jun 28, 2026
081285b
fix issue #855
oyeaussie Jun 29, 2026
08d982c
fix issue #856
oyeaussie Jun 29, 2026
4fa0b64
updat #701 - add extraction of ip2location countries via its csv file.
oyeaussie Jun 29, 2026
3ff2e5e
update #701, add schema
oyeaussie Jun 29, 2026
d3675dc
update #854
oyeaussie Jun 29, 2026
86b49da
update #854
oyeaussie Jun 29, 2026
b122f50
update #854
oyeaussie Jul 1, 2026
62fd7f0
update #854
oyeaussie Jul 1, 2026
46830d6
update #854 - add logging for ipfilter
oyeaussie Jul 1, 2026
ce73c11
update #853
oyeaussie Jul 1, 2026
6adbe79
update #701
oyeaussie Jul 1, 2026
c134185
fix issue #857
oyeaussie Jul 1, 2026
1af33b3
update #854.
oyeaussie Jul 2, 2026
a9dbf6b
update #854
oyeaussie Jul 2, 2026
0644ffd
update #854
oyeaussie Jul 3, 2026
f2378f7
update #854
oyeaussie Jul 3, 2026
2e380c6
update #854
oyeaussie Jul 4, 2026
69e42eb
update #854
oyeaussie Jul 4, 2026
f22434a
update #854
oyeaussie Jul 4, 2026
66ca3b0
update #854
oyeaussie Jul 4, 2026
4a08003
update #854
oyeaussie Jul 4, 2026
d6f293f
fix issue #858
oyeaussie Jul 4, 2026
786f2f2
update #858. Fix not able to remove App Type
oyeaussie Jul 4, 2026
cee0b06
update #859
oyeaussie Jul 5, 2026
d5d8414
Merge remote-tracking branch 'origin/dev' into dev
oyeaussie Jul 5, 2026
6bfe9f5
update #859
oyeaussie Jul 5, 2026
a052cd8
update #859
oyeaussie Jul 5, 2026
fbe95ec
update #859
oyeaussie Jul 5, 2026
2aafc63
update #853, cleanup instaler
oyeaussie Jul 5, 2026
250dc34
update #860, fixed check for menu id when removing menu during uninstall
oyeaussie Jul 5, 2026
1162f85
update #860. Menu was not being attached to the component due to data…
oyeaussie Jul 5, 2026
efc7d84
update #860, fix tr not showing up red bg on an error.
oyeaussie Jul 5, 2026
042fb47
update #860, add check on dbInstaller to ignore if the store does not…
oyeaussie Jul 5, 2026
37cb83e
update #860, fix issue with not able to register new filter
oyeaussie Jul 5, 2026
dffcbc4
update #860. In case we uninstall all modules using force uninstall (…
oyeaussie Jul 5, 2026
a504c99
fix issue #862
oyeaussie Jul 5, 2026
9e8416a
fix issue #863
oyeaussie Jul 5, 2026
e128701
update #854, fix bug with code not being correct
oyeaussie Jul 6, 2026
effdb65
update #854, we need app ID to check filters via app else the filter …
oyeaussie Jul 6, 2026
c2b3f0f
update #854
oyeaussie Jul 6, 2026
9bde2e0
update #854
oyeaussie Jul 6, 2026
35b72c1
update #854
oyeaussie Jul 6, 2026
e401a51
update #854
oyeaussie Jul 6, 2026
1935380
update #854
oyeaussie Jul 6, 2026
55ccff5
update #854
oyeaussie Jul 6, 2026
27431bc
update #854, added check for firewall status
oyeaussie Jul 6, 2026
aa134e1
update #854
oyeaussie Jul 6, 2026
d9b9356
update #854
oyeaussie Jul 6, 2026
a0a09f7
update #854
oyeaussie Jul 6, 2026
524de3f
Merge remote-tracking branch 'origin/dev' into dev
oyeaussie Jul 6, 2026
4717080
update #854
oyeaussie Jul 6, 2026
d0d8ac6
update #854, move appId to init as we only need it via app component
oyeaussie Jul 6, 2026
2c32ca6
update #854
oyeaussie Jul 6, 2026
d06e3cb
update #854, update how disabling of ip filter is handled
oyeaussie Jul 6, 2026
e27da79
update #854
oyeaussie Jul 6, 2026
ab615e0
update #854
oyeaussie Jul 6, 2026
d7fd0ed
update #854
oyeaussie Jul 6, 2026
3572e6b
update #854
oyeaussie Jul 6, 2026
22bfd79
update #854, after enabling filters, we need to save app, else we wil…
oyeaussie Jul 6, 2026
4cc41d7
update #854
oyeaussie Jul 6, 2026
85f4d35
update #854
oyeaussie Jul 6, 2026
237907d
update #854
oyeaussie Jul 6, 2026
f7fde3e
Merge remote-tracking branch 'origin/dev' into dev
oyeaussie Jul 6, 2026
6e441ef
update #701, fix bug with ip2location proxy
oyeaussie Jul 6, 2026
1e5a719
update #854 fix bug with ip2location throwing exception due to null ip.
oyeaussie Jul 6, 2026
736d495
update #332, add condition to check if there are filters.
oyeaussie Jul 6, 2026
b8d567f
Initial commit #566
oyeaussie Jul 6, 2026
208f08b
update #566
oyeaussie Jul 6, 2026
5b270df
fix issue #864
oyeaussie Jul 7, 2026
128bf07
update #566, fix bug with email exception
oyeaussie Jul 7, 2026
cd2c59c
update #566, add emailservices as dependency for client add
oyeaussie Jul 7, 2026
d93ff68
update #566, add indexing to client. Improve performance of API lookup.
oyeaussie Jul 7, 2026
cedc969
fix issue #865
oyeaussie Jul 7, 2026
91d0f46
update #566, fix bug with api information not showing up in users pro…
oyeaussie Jul 7, 2026
a2d5b61
update #566
oyeaussie Jul 7, 2026
7d44c9c
update #566, fix position of response on datatable.
oyeaussie Jul 7, 2026
57fbe77
fix issue #866
oyeaussie Jul 7, 2026
21450fe
fix issue #867
oyeaussie Jul 7, 2026
e6a52d3
Merge remote-tracking branch 'origin/dev' into dev
oyeaussie Jul 7, 2026
135f9c5
update #566, update oauth-server package version in composer
oyeaussie Jul 7, 2026
18a537c
update #566, add correct declaration as per interface
oyeaussie Jul 7, 2026
735bd13
update #566
oyeaussie Jul 7, 2026
3bcaed0
try fix issue #868
oyeaussie Jul 7, 2026
75e4d60
fix issue #869
oyeaussie Jul 8, 2026
b8616d4
Merge remote-tracking branch 'origin/dev' into dev
oyeaussie Jul 8, 2026
21845ed
update #867
oyeaussie Jul 8, 2026
4a4ceb1
fix issue #870
oyeaussie Jul 8, 2026
9efe6db
update #867
oyeaussie Jul 8, 2026
0712e10
update #870
oyeaussie Jul 8, 2026
f3107c6
fix issue #871
oyeaussie Jul 8, 2026
65ff4b1
fix issue #872
oyeaussie Jul 8, 2026
09dd4c0
fix issue #873
oyeaussie Jul 8, 2026
ce6bf02
update #566, fixed caching, added correct methods to route. fixed acl…
oyeaussie Jul 8, 2026
e0791ae
update #566, added method getRows to get rows data.
oyeaussie Jul 8, 2026
6c85328
update #566, add component api file to devtools
oyeaussie Jul 8, 2026
d706652
update #566, add test api for murls
oyeaussie Jul 8, 2026
8bf0293
initial commit #875
oyeaussie Jul 9, 2026
43ef412
update #875
oyeaussie Jul 9, 2026
c5a01fe
initial commit #876
oyeaussie Jul 9, 2026
2fe82bf
update #875
oyeaussie Jul 9, 2026
73d5ebf
update #875
oyeaussie Jul 9, 2026
12951b7
update #517
oyeaussie Jul 9, 2026
123c87d
update #566, fix registration and token generation
oyeaussie Jul 9, 2026
cb9c5a8
update #566, add check for registering client if their email is in ac…
oyeaussie Jul 9, 2026
38b35ed
update #566, add token generation via register url for new tokens.
oyeaussie Jul 9, 2026
0c292f3
fix issue #877
oyeaussie Jul 10, 2026
951b24f
update #877, fix checkboxes
oyeaussie Jul 10, 2026
dd93828
update #566, add quick filter
oyeaussie Jul 10, 2026
9930ac7
fix issue #878
oyeaussie Jul 10, 2026
ddbd7c9
update #566, add filters
oyeaussie Jul 10, 2026
cc334a2
update #878
oyeaussie Jul 10, 2026
a4de37d
fix issue #879
oyeaussie Jul 10, 2026
e27e354
fix issue #880
oyeaussie Jul 10, 2026
7365f86
update issue #879
oyeaussie Jul 10, 2026
d99c0fc
update #566, add pki keys to backup
oyeaussie Jul 10, 2026
477d454
update #566, remove private key information from api information sent…
oyeaussie Jul 11, 2026
5ec9269
update #566, move client key generation to grant tab. Add check for c…
oyeaussie Jul 11, 2026
c7d7d12
update #566. Add user/pass authentication.
oyeaussie Jul 11, 2026
1d44600
fix issue #882
oyeaussie Jul 12, 2026
f1f3cd7
update #882. Fix class and file names for Repos api
oyeaussie Jul 12, 2026
51d592d
update #882, fix json files for repos api
oyeaussie Jul 12, 2026
0819d8d
Initial Commit #883
oyeaussie Jul 13, 2026
107f1c2
update #566. Fix ACL, scopes check for annotation generation.
oyeaussie Jul 13, 2026
21be967
update #883
oyeaussie Jul 13, 2026
468eba4
update #566, add basic core api
oyeaussie Jul 13, 2026
a31597d
update #881, add frameworks api for clients.
oyeaussie Jul 13, 2026
d106f08
update #883, add only model and Api.php files.
oyeaussie Jul 13, 2026
169ab2c
update #883, fix issue with API file being ignored. Added BaseApi res…
oyeaussie Jul 13, 2026
59f6f5b
update #881, generate classes for SP, initial commit
oyeaussie Jul 13, 2026
c833433
update #883, generate correct version
oyeaussie Jul 13, 2026
fd8d90f
update #881, add correct schema
oyeaussie Jul 13, 2026
3050c03
update #881, fix divider on list view
oyeaussie Jul 13, 2026
322be90
update #881, add view
oyeaussie Jul 13, 2026
6c7bb50
update #883, update response for core api
oyeaussie Jul 13, 2026
d52fe28
update #883, update response attributes, remove server name
oyeaussie Jul 13, 2026
329ceae
update #881, correct response
oyeaussie Jul 13, 2026
f92e098
update #883, add murls path
oyeaussie Jul 13, 2026
e109c81
update #566, update response for 404 not found
oyeaussie Jul 13, 2026
5fd9018
update #883, update responses
oyeaussie Jul 13, 2026
af0bd85
update #881, update responses
oyeaussie Jul 13, 2026
78464a7
update #881, add updateMurl
oyeaussie Jul 13, 2026
74f0056
update #883, updateMurl
oyeaussie Jul 13, 2026
7a3df42
update #881, fix route for murl update url
oyeaussie Jul 13, 2026
3edf45c
update #566, update ACL permission check for API
oyeaussie Jul 13, 2026
f33df5a
update #881, fix murl url
oyeaussie Jul 13, 2026
d034672
update #566, fix response code to set http codes if response code is …
oyeaussie Jul 14, 2026
321b76f
update #881, update murl to include api_id
oyeaussie Jul 14, 2026
0901162
update #881, fix valid_till for murl
oyeaussie Jul 14, 2026
dd660b7
update #556, add account() method to grab account information of auth…
oyeaussie Jul 14, 2026
6c0417f
update #881, updateMurl method update
oyeaussie Jul 14, 2026
165f6cc
fix issue #884
oyeaussie Jul 14, 2026
36a256d
initial commit #461 add validation to basepackage
oyeaussie Jul 14, 2026
151be18
update #881, validation of murl update data
oyeaussie Jul 14, 2026
d9122e0
fix issue #885
oyeaussie Jul 14, 2026
6a7014f
fix issue #886
oyeaussie Jul 15, 2026
8c38322
update issue #461
oyeaussie Jul 15, 2026
ffb9974
update issue #885
oyeaussie Jul 15, 2026
59ba4a6
fix issue #887, user can put the prefix in the authorization field no…
oyeaussie Jul 15, 2026
fcb7b48
update #887, fix spelling
oyeaussie Jul 15, 2026
5786008
udpate #881, add murl update and remove
oyeaussie Jul 15, 2026
0ac6313
update #566, add logException
oyeaussie Jul 15, 2026
02ac968
update #461, add ignoreFields. When validating add, you can put ID in…
oyeaussie Jul 15, 2026
727bd1b
update #883, add basic auth security and murl add and remove
oyeaussie Jul 15, 2026
75b91ef
update #556, add limit, page and columns to getRows
oyeaussie Jul 15, 2026
2b836ad
update #883, fix security scheme, add murls paged params
oyeaussie Jul 15, 2026
02d3558
update #881, update murl
oyeaussie Jul 15, 2026
4d70782
update #883, make getRows for murl as post so we can send data for fi…
oyeaussie Jul 15, 2026
0660e7f
update #881, change murl getRows request to post for filtered search
oyeaussie Jul 15, 2026
638abc0
update #881, correct route for getRows
oyeaussie Jul 15, 2026
914b72a
update #556, action is view and method is post, change methods to post.
oyeaussie Jul 15, 2026
0c9ca3e
update #881
oyeaussie Jul 15, 2026
8367068
update #461, add option to pass callbacks, nonZeroFields check and re…
oyeaussie Jul 16, 2026
3271128
update #461, changed option of fields to check to fields to custom ch…
oyeaussie Jul 16, 2026
82bbb2a
fix issue #888. We were not updating criteriaCount which causes a sec…
oyeaussie Jul 16, 2026
00ebb4a
update #881, add order parameter
oyeaussie Jul 16, 2026
cd3b69f
update #556, add order parameter to getRows
oyeaussie Jul 16, 2026
3cce7b8
update #881, add order to murl
oyeaussie Jul 16, 2026
97dcc55
update #461. Added exception and exception handler for micro. Added c…
oyeaussie Jul 16, 2026
7a28030
update #566, changed account_id only required for Grant type authoriz…
oyeaussie Jul 16, 2026
0a12afa
update #461, fix issue with checkfields not checking presenseOf
oyeaussie Jul 16, 2026
f292bc2
update #566, testing authorization
oyeaussie Jul 16, 2026
3930907
update #461, update documentation, add param to replace or merge the …
oyeaussie Jul 17, 2026
b4c819d
fix issue #889
oyeaussie Jul 17, 2026
1af536c
update #566, add refresh token to forms
oyeaussie Jul 17, 2026
8387cf6
update #566, increase field sizes.
oyeaussie Jul 17, 2026
7d98c16
update #461, add data validation to Basecomponent
oyeaussie Jul 18, 2026
a3be602
update #881, add Oauth client configuration to form
oyeaussie Jul 18, 2026
5fe03af
update #881, fix checking of categoryProviderClass when api is defined
oyeaussie Jul 18, 2026
56e4d0f
update #881, fix bug with field name
oyeaussie Jul 18, 2026
d17b946
update #881, fix redirect_uri
oyeaussie Jul 18, 2026
eb16330
update #881
oyeaussie Jul 18, 2026
5aff833
update #881
oyeaussie Jul 18, 2026
66c9aab
update #881, add method for registering oauth client authorization_code
oyeaussie Jul 18, 2026
d074b4e
udpate #881, add tokentype and expires
oyeaussie Jul 18, 2026
b6cd1e6
update #881, populate registered token information.
oyeaussie Jul 18, 2026
97c58e6
update #881, add correct expires in information.
oyeaussie Jul 18, 2026
3300155
update #566, add UTC timestamp for uniformity across client and server
oyeaussie Jul 18, 2026
34cad92
update #566, fix registration component
oyeaussie Jul 18, 2026
533d7cb
update #566, add option to email end user with new client information.
oyeaussie Jul 18, 2026
cf26973
update #566, remove need for CSRF as we will use state
oyeaussie Jul 18, 2026
888cb84
update #566, set account after verifying client
oyeaussie Jul 19, 2026
8197722
update #881, add refresh method to refresh token if less than 5 mins …
oyeaussie Jul 19, 2026
d77f9d4
update #881, add refresh
oyeaussie Jul 19, 2026
363e90c
udpate #881, fix refresh
oyeaussie Jul 20, 2026
df1dbbc
update #566
oyeaussie Jul 21, 2026
2131a97
update #881
oyeaussie Jul 21, 2026
5d5165b
update #566
oyeaussie Jul 21, 2026
89631b9
update #566, if client id is revoked, we should send a message.
oyeaussie Jul 21, 2026
b657424
update #566
oyeaussie Jul 21, 2026
78fe3a8
update #881
oyeaussie Jul 21, 2026
ae0b062
update #881
oyeaussie Jul 21, 2026
85e6f87
update #881
oyeaussie Jul 21, 2026
22b7d53
update #566
oyeaussie Jul 21, 2026
0d58ef6
update #881 add client_credentials to client
oyeaussie Jul 21, 2026
18cd7d4
Merge remote-tracking branch 'origin/dev' into dev
oyeaussie Jul 21, 2026
3a6d448
update #886, disable ffvalidation for updating filter to improve perf…
oyeaussie Jul 26, 2026
7d2b8c1
update #881
oyeaussie Jul 26, 2026
5caaf63
update #566
oyeaussie Jul 26, 2026
0b6021e
udpate #881
oyeaussie Jul 26, 2026
706f109
update #881, if there is no token, we get the token via register on a…
oyeaussie Jul 27, 2026
ae2dcdc
update #881
oyeaussie Jul 27, 2026
ad29f66
update #853, only update progress if there is a method.
oyeaussie Jul 27, 2026
582c57e
update #566, add revoke and regen keys information to db.
oyeaussie Jul 27, 2026
738f808
update #566, fix client calls count.
oyeaussie Jul 27, 2026
1c4edb0
update #847, fix bug with filter not being processed if filter sent i…
oyeaussie Jul 28, 2026
6d7c9a2
update #847, fix bug with quick filter not showing correct dropdown i…
oyeaussie Jul 28, 2026
c8579c7
update #566 fix bug for github token not being assigned to the header.
oyeaussie Jul 29, 2026
4b43e79
fix issue #890
oyeaussie Jul 29, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
17 changes: 13 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,20 @@ apps/*
!apps/Core/
.ff/*
.sql/*
system/Base/Providers/BasepackagesServiceProvider/Packages/Geo/Data/*
!system/Base/Providers/BasepackagesServiceProvider/Packages/Geo/Data/AllCountries.json
!system/Base/Providers/BasepackagesServiceProvider/Packages/Geo/Data/TimeZones.json
system/Base/Providers/BasepackagesServiceProvider/Packages/DataExtractors/*
!system/Base/Providers/BasepackagesServiceProvider/Packages/DataExtractors/vendor
!system/Base/Providers/BasepackagesServiceProvider/Packages/DataExtractors/Geo
system/Base/Providers/BasepackagesServiceProvider/Packages/DataExtractors/Geo/*
!system/Base/Providers/BasepackagesServiceProvider/Packages/DataExtractors/Geo/AllCountries.json
!system/Base/Providers/BasepackagesServiceProvider/Packages/DataExtractors/Geo/TimeZones.json
!system/Base/Providers/BasepackagesServiceProvider/Packages/DataExtractors/Ip2location
system/Base/Providers/BasepackagesServiceProvider/Packages/DataExtractors/Ip2location/*
!system/Base/Providers/BasepackagesServiceProvider/Packages/DataExtractors/Ip2location/AllCountries.json
.api/
phpstan.neon
psalm.xml
docker*
phpunit*
phpunit*
.phpdoc*
docs*
devdocs*
6 changes: 6 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,9 @@
[submodule "apps/Core/Packages/Devtools/GeoExtractData/Data"]
path = apps/Core/Packages/Devtools/GeoExtractData/Data
url = https://github.com/sp-framework/geodata.git
[submodule "docs"]
path = docs
url = https://github.com/sp-framework/docs.git
[submodule "devdocs"]
path = devdocs
url = https://github.com/sp-framework/devdocs.git
187 changes: 144 additions & 43 deletions apps/Core/Components/Apps/AppsComponent.php
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,8 @@ public function viewAction()

//Middlewares
$middlewaresArr = $this->modules->middlewares->getMiddlewaresForAppType($app['app_type'], $app['id'], true);
$ip2locationCountries = [];
$ip2locationInfo = [];
foreach ($middlewaresArr as $key => &$middlewareValue) {
if ($middlewareValue['apps']) {
if (is_string($middlewareValue['apps'])) {
Expand All @@ -221,7 +223,16 @@ public function viewAction()
}
}
$middlewares[$key] = $middlewareValue;

if ($middlewareValue['name'] === 'IpFilter') {
if (isset($middlewareValue['apps'][$app['id']]) && $middlewareValue['apps'][$app['id']]['enabled']) {
$ip2locationCountries = $this->access->ipFilter->ip2location->getAllCountries();
$ip2locationInfo = $this->access->ipFilter->ip2location->getIp2locationInfo();
}
}
}
$this->view->ip2locationCountries = $ip2locationCountries;
$this->view->ip2locationInfo = $ip2locationInfo;

//Views
$viewsArr = $this->modules->views->getViewsForAppType($app['app_type'], false, true);
Expand Down Expand Up @@ -447,41 +458,51 @@ public function removeAction()
}
}

public function getFiltersAction()
public function saveMiddlewareSettingsAction()
{
$this->requestIsPost();

$filters = $this->access->ipFilter->getFilters($this->postData());
$this->modules->middlewares->saveMiddlewareSettings($this->postData());

foreach ($filters as $key => &$filter) {
unset ($filter['app_id']);
if ($filter['address_type'] == '1') {
$filter['address_type'] = 'host';
} else if ($filter['address_type'] == '2') {
$filter['address_type'] = 'network';
}
$this->addResponse(
$this->modules->middlewares->packagesData->responseMessage,
$this->modules->middlewares->packagesData->responseCode,
$this->modules->middlewares->packagesData->responseData ?? []
);
}

if ($filter['filter_type'] == '1') {
$filter['filter_type'] = "allow";
} else if ($filter['filter_type'] == '2') {
$filter['filter_type'] = "block";
} else if ($filter['filter_type'] == '3') {
$filter['filter_type'] = "monitor";
}
public function getFiltersAction()
{
$this->requestIsPost();

if ($filter['added_by'] == '0') {
$filter['added_by'] = "System";
} else {
$user = $this->basepackages->accounts->getAccountById($filter['added_by']);
$filters = $this->access->ipFilter->filters->getFilters($this->postData());

if ($user && isset($user['profile']['full_name'])) {
$filter['added_by'] = $user['profile']['full_name'];
if ($filters && count($filters) > 0) {
foreach ($filters as $key => &$filter) {
unset ($filter['app_id']);
unset ($filter['decimal']);
unset ($filter['parent_id']);

if ($filter['updated_by'] == '0') {
$filter['updated_by'] = "System";
} else {
$filter['added_by'] = "System";
$user = $this->basepackages->accounts->getAccountById($filter['updated_by']);

if ($user && isset($user['contact']['full_name'])) {
$filter['updated_by'] = $user['contact']['full_name'];
} else {
$filter['updated_by'] = "System";
}
}

try {
$filter['updated_at'] = (\Carbon\Carbon::parse($filter['updated_at']))->toDateTimeString();
} catch (\throwable $e) {
$filter['updated_at'] = '-';
}
}

$filter['actions'] = '';
$filter['actions'] = '';
}
}

$this->view->data = $filters;
Expand All @@ -491,59 +512,62 @@ public function addFilterAction()
{
$this->requestIsPost();

$this->access->ipFilter->addFilter($this->postData());
$this->access->ipFilter->init($this->postData()['app_id'])->filters->addFilter($this->postData());

$this->addResponse(
$this->access->ipFilter->packagesData->responseMessage,
$this->access->ipFilter->packagesData->responseCode
$this->access->ipFilter->filters->packagesData->responseMessage,
$this->access->ipFilter->filters->packagesData->responseCode,
$this->access->ipFilter->filters->packagesData->responseData ?? []
);
}

public function removeFilterAction()
public function updateFilterAction()
{
$this->requestIsPost();

$this->access->ipFilter->removeFilter($this->postData());
$this->access->ipFilter->init($this->postData()['app_id'])->filters->updateFilter($this->postData());

$this->addResponse(
$this->access->ipFilter->packagesData->responseMessage,
$this->access->ipFilter->packagesData->responseCode
$this->access->ipFilter->filters->packagesData->responseMessage,
$this->access->ipFilter->filters->packagesData->responseCode,
$this->access->ipFilter->filters->packagesData->responseData ?? []
);
}

public function allowFilterAction()
public function removeFilterAction()
{
$this->requestIsPost();

$this->access->ipFilter->allowFilter($this->postData());
$this->access->ipFilter->init($this->postData()['app_id'])->filters->removeFilter($this->postData());

$this->addResponse(
$this->access->ipFilter->packagesData->responseMessage,
$this->access->ipFilter->packagesData->responseCode
$this->access->ipFilter->filters->packagesData->responseMessage,
$this->access->ipFilter->filters->packagesData->responseCode
);
}

public function blockFilterAction()
public function resetAppFiltersAction()
{
$this->requestIsPost();

$this->access->ipFilter->blockFilter($this->postData());
$this->access->ipFilter->init($this->postData()['app_id'])->filters->resetAppFilters($this->postData());

$this->addResponse(
$this->access->ipFilter->packagesData->responseMessage,
$this->access->ipFilter->packagesData->responseCode
$this->access->ipFilter->filters->packagesData->responseMessage,
$this->access->ipFilter->filters->packagesData->responseCode
);
}

public function resetAppFiltersAction()
public function checkIpAction()
{
$this->requestIsPost();

$this->access->ipFilter->resetAppFilters($this->postData());
$this->access->ipFilter->init($this->postData()['app_id'])->checkIp($this->postData()['ip'], null, true);

$this->addResponse(
$this->access->ipFilter->packagesData->responseMessage,
$this->access->ipFilter->packagesData->responseCode
$this->access->ipFilter->packagesData->responseCode,
$this->access->ipFilter->packagesData->responseData ?? []
);
}

Expand Down Expand Up @@ -584,4 +608,81 @@ public function getViewsForAppTypeAction()
$this->addResponse('No Views Installed', 1);
}
}

public function searchCountryAction()
{
$this->requestIsPost();

if (isset($this->postData()['search'])) {
$searchQuery = $this->postData()['search'];

if (strlen($searchQuery) < 3) {
return;
}

$countries = $this->access->ipFilter->ip2location->searchCountries($searchQuery);

$countries = msort($countries, 'id');

$this->addResponse(
$this->access->ipFilter->packagesData->responseMessage,
$this->access->ipFilter->packagesData->responseCode,
['countries' => $countries] ?? []
);
} else {
$this->addResponse('Search Query Missing', 1);
}
}

public function searchStateAction()
{
$this->requestIsPost();

if (isset($this->postData()['country_id']) && isset($this->postData()['search'])) {
$countryId = $this->postData()['country_id'];
$searchQuery = $this->postData()['search'];

if (strlen($searchQuery) < 3) {
return;
}

$states = $this->access->ipFilter->ip2location->searchStates($countryId, $searchQuery);

$states = msort($states, 'id');

$this->addResponse(
$this->access->ipFilter->packagesData->responseMessage,
$this->access->ipFilter->packagesData->responseCode,
['states' => $states] ?? []
);
} else {
$this->addResponse('Search Query Missing', 1);
}
}

public function searchCityAction()
{
$this->requestIsPost();

if (isset($this->postData()['country_id']) && isset($this->postData()['search'])) {
$countryId = $this->postData()['country_id'];
$searchQuery = $this->postData()['search'];

if (strlen($searchQuery) < 3) {
return;
}

$cities = $this->access->ipFilter->ip2location->searchCities($countryId, $searchQuery);

$cities = msort($cities, 'id');

$this->addResponse(
$this->access->ipFilter->packagesData->responseMessage,
$this->access->ipFilter->packagesData->responseCode,
['cities' => $cities] ?? []
);
} else {
$this->addResponse('Search Query Missing', 1);
}
}
}
6 changes: 6 additions & 0 deletions apps/Core/Components/Auth/AuthComponent.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,12 @@ class AuthComponent extends BaseComponent
{
public function viewAction()
{
if (isset($this->getData()['blocked']) && $this->getData()['blocked'] === 'true') {
echo 'Blocked!';

return false;
}

$this->view->setLayout('auth');

$this->view->canRegister = false;
Expand Down
13 changes: 13 additions & 0 deletions apps/Core/Components/Devtools/Modules/ModulesComponent.php
Original file line number Diff line number Diff line change
Expand Up @@ -956,6 +956,19 @@ public function getDefaultDependenciesAction()
}
}

public function getLatestModuleVersionAction()
{
$this->requestIsPost();

$this->modulesPackage->getLatestModuleVersion($this->postData());

$this->addResponse(
$this->modulesPackage->packagesData->responseMessage,
$this->modulesPackage->packagesData->responseCode,
$this->modulesPackage->packagesData->responseData ?? []
);
}

public function checkVersionAction()
{
$this->requestIsPost();
Expand Down
Loading