Skip to content

Commit 098641b

Browse files
committed
Merge branch 'epic/FOUR-20297-b' of github.com:ProcessMaker/processmaker into feature/FOUR-20301-solo-menu-process
2 parents 316fde4 + f728483 commit 098641b

11 files changed

Lines changed: 95 additions & 32 deletions

File tree

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
<?php
2+
3+
namespace ProcessMaker\Console\Commands;
4+
5+
use Illuminate\Console\Command;
6+
use Illuminate\Support\Facades\Artisan;
7+
use Illuminate\Support\Facades\DB;
8+
use Carbon\Carbon;
9+
10+
class RevokeOauthAccessTokens extends Command
11+
{
12+
/**
13+
* The name and signature of the console command.
14+
*
15+
* @var string
16+
*/
17+
protected $signature = 'processmaker:revoke-oauth-access-tokens {--name=} {--after=} {--client_id=} {--no-interaction|n}';
18+
19+
/**
20+
* The console command description.
21+
*
22+
* @var string
23+
*/
24+
protected $description = 'Revoke oauth access tokens for a given token name, client_id, or after a given date';
25+
26+
/**
27+
* Execute the console command.
28+
*
29+
* @return mixed
30+
*/
31+
public function handle()
32+
{
33+
$name = $this->option('name');
34+
$after = $this->option('after');
35+
$clientId = $this->option('client_id');
36+
$noInteraction = $this->option('no-interaction');
37+
38+
if (!$name && !$after && !$clientId) {
39+
$this->error('At least one of --name, --after, or --client_id must be specified.');
40+
return;
41+
}
42+
43+
if (!$noInteraction && !$this->confirm('Are you sure you want to revoke this certificate?')) {
44+
$this->info('Certificate revocation cancelled.');
45+
return;
46+
}
47+
48+
$query = DB::table('oauth_access_tokens')->where('revoked', false);
49+
50+
if ($name) {
51+
$names = explode(',', $name);
52+
$query->whereIn('name', $names);
53+
}
54+
55+
if ($after) {
56+
$date = Carbon::createFromFormat('Y-m-d', $after);
57+
$query->where('created_at', '>', $date);
58+
}
59+
60+
if ($clientId) {
61+
$clientIds = explode(',', $clientId);
62+
$query->whereIn('client_id', $clientIds);
63+
}
64+
65+
$revokedCount = $query->update(['revoked' => true]);
66+
67+
$this->info("Revoked $revokedCount tokens.");
68+
}
69+
}

‎composer.json‎

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "processmaker/processmaker",
3-
"version": "4.12.0",
3+
"version": "4.12.2",
44
"description": "BPM PHP Software",
55
"keywords": [
66
"php bpm processmaker"
@@ -107,7 +107,7 @@
107107
"Gmail"
108108
],
109109
"processmaker": {
110-
"build": "fe0627fe",
110+
"build": "2c11d2de",
111111
"cicd-enabled": true,
112112
"custom": {
113113
"package-ellucian-ethos": "1.17.0",
@@ -156,11 +156,11 @@
156156
"package-cdata": "1.4.5",
157157
"package-collections": "2.20.0",
158158
"package-comments": "1.15.0",
159-
"package-conversational-forms": "1.11.0",
160-
"package-data-sources": "1.30.0",
161-
"package-decision-engine": "1.12.0",
159+
"package-conversational-forms": "1.11.1",
160+
"package-data-sources": "1.30.1",
161+
"package-decision-engine": "1.12.1",
162162
"package-dynamic-ui": "1.24.0",
163-
"package-files": "1.19.0",
163+
"package-files": "1.19.2",
164164
"package-googleplaces": "1.12.0",
165165
"package-photo-video": "1.6.0",
166166
"package-pm-blocks": "1.9.0",
@@ -169,7 +169,7 @@
169169
"package-product-analytics": "1.5.8",
170170
"package-projects": "1.7.0",
171171
"package-rpa": "1.1.0",
172-
"package-savedsearch": "1.38.0",
172+
"package-savedsearch": "1.38.1",
173173
"package-slideshow": "1.2.0",
174174
"package-sentry": "1.10.0",
175175
"package-signature": "1.14.0",

‎composer.lock‎

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎package-lock.json‎

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎package.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@processmaker/processmaker",
3-
"version": "4.12.0",
3+
"version": "4.12.2",
44
"description": "ProcessMaker 4",
55
"author": "DevOps <devops@processmaker.com>",
66
"license": "ISC",

‎resources/js/components/shared/FilterTableBodyMixin.js‎

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,10 +52,16 @@ export default {
5252
};
5353
},
5454
formatCategory(categories) {
55-
return categories.map(item => item.name).join(', ');
55+
return categories?.map(item => item.name).join(', ');
5656
},
5757
getNestedPropertyValue(obj, header) {
58-
return this.format(get(obj, header.field), header);
58+
const value = get(obj, header.field);
59+
60+
if (typeof header.cb === 'function') {
61+
return header.cb(value, obj);
62+
}
63+
64+
return this.format(value, header);
5965
},
6066
format(value, header) {
6167
let config = "";

‎resources/js/processes/screens/components/ScreenListing.vue‎

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -208,14 +208,12 @@ export default {
208208
title: () => this.$t("Category"),
209209
name: "categories",
210210
label: this.$t("Category"),
211-
field: "category.name",
211+
field: "categories",
212212
sortable: true,
213213
direction: "none",
214214
width: 150,
215215
sortField: "category.name",
216-
callback(categories) {
217-
return categories.map(item => item.name).join(', ');
218-
},
216+
cb: (categories) => this.formatCategory(categories),
219217
},
220218
{
221219
title: () => this.$t("Type"),

‎resources/js/processes/scripts/components/ScriptListing.vue‎

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -185,13 +185,11 @@ export default {
185185
name: "categories",
186186
sortField: "category.name",
187187
label: this.$t("Category"),
188-
field: "category.name",
188+
field: "categories",
189189
sortable: true,
190190
direction: "none",
191191
width: 150,
192-
callback(categories) {
193-
return categories.map(item => item.name).join(', ');
194-
},
192+
cb: (categories) => this.formatCategory(categories),
195193
},
196194
{
197195
title: () => this.$t("Language"),

‎resources/views/processes/edit.blade.php‎

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -186,15 +186,6 @@ class="invalid-feedback"
186186
</div>
187187
</b-col>
188188
<b-col>
189-
<div class="form-group">
190-
<select-user-group
191-
:label="$t('Reassignment Permission')"
192-
v-model="reassignmentPermissions"
193-
:multiple="true"
194-
:activeTasksCount="true"
195-
/>
196-
<small>{{__('In addition to the process manager, these users and groups will have permission to reassign any task in this process, regardless of the "Allow Reassignment" task setting.')}}</small>
197-
</div>
198189
</b-col>
199190
</b-row>
200191
</div>

‎routes/api.php‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@
5959
Route::put('password/change', [ChangePasswordController::class, 'update'])->name('password.update');
6060
Route::put('users/update_language', [UserController::class, 'updateLanguage'])->name('users.updateLanguage');
6161
Route::get('users_task_count', [UserController::class, 'getUsersTaskCount'])->name('users.users_task_count')
62-
->middleware('can:view-users|create-processes|edit-processes|create-projects|view-projects');
62+
->middleware('can:view-users');
6363

6464
// User Groups
6565
Route::put('users/{user}/groups', [UserController::class, 'updateGroups'])->name('users.groups.update')->middleware('can:edit-users');

0 commit comments

Comments
 (0)