Skip to content

Commit

Permalink
update 07 to fix issue #1143
Browse files Browse the repository at this point in the history
  • Loading branch information
brunobuzzi committed Jul 24, 2020
1 parent ef952dc commit 87a1734
Show file tree
Hide file tree
Showing 13 changed files with 29 additions and 12 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
other
canUser: aBpmUser createProcess: aBpmProcessDefinition

self isStartEvent ifFalse: [^false].

^(aBpmUser rolesIn: aBpmProcessDefinition bpmEnvironment) anySatisfy: [:eachRole | roles includesIdentical: eachRole]
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
"addToParentProcess" : "BrunoBB 08/06/2016 14:41",
"attachedTask" : "brunobb 10/18/2017 12:13",
"attachedTask:" : "brunobb 10/18/2017 12:13",
"canUser:createProcess:" : "bruno 07/24/2020 13:40",
"cycle" : "BrunoBB 08/06/2016 14:27",
"cycle:" : "BrunoBB 08/06/2016 14:27",
"drawFirstOn:" : "BrunoBB 12/06/2016 04:26",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ canCreateProcess: aBpmUser

aBpmUser ifNil: [^true]. "a process can be created with anonymous user"

^(aBpmUser isBackofficeUserAndAdminIn: processDefinition bpmEnvironment) or: [aBpmUser includesAnyRoleOf: startEvent roles in: processDefinition bpmEnvironment]
^(aBpmUser isBackofficeUserAndAdminIn: processDefinition bpmEnvironment) or: [startEvent canUser: aBpmUser createProcess: processDefinition]
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ getAllRoles

allRoles := OrderedCollection new.

tasks do: [:each | allRoles addAll: each roles].
tasks do: [:eachTask |
eachTask rolesDo: [:eachRole | allRoles add: eachRole]].

^allRoles
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,14 @@
"addTask:" : "BrunoBB 10/27/2015 17:17",
"addTransition:" : "BrunoBB 10/27/2015 17:20",
"canBeStartedByAnonymousForm" : "BrunoBB 04/10/2016 17:44",
"canCreateProcess:" : "brunobb 01/28/2020 04:11",
"canCreateProcess:" : "bruno 07/24/2020 13:41",
"endEvents" : "BrunoBB 10/27/2015 17:25",
"endEvents:" : "BrunoBB 10/27/2015 17:25",
"gateways" : "BrunoBB 10/27/2015 15:21",
"gateways:" : "BrunoBB 10/27/2015 15:21",
"getAllArtifacts" : "BrunoBB 06/22/2016 11:44",
"getAllFieldNames" : "BrunoBB 11/12/2016 07:55",
"getAllRoles" : "BrunoBB 04/11/2016 09:49",
"getAllRoles" : "bruno 07/24/2020 13:43",
"getAnonymousFormName" : "brunobb 12/04/2018 06:53",
"getEndEventNamed:ifNone:" : "BrunoBB 10/28/2015 12:13",
"getGatewayNamed:ifNone:" : "BrunoBB 10/28/2015 12:12",
Expand Down
2 changes: 1 addition & 1 deletion repository/BpmCore.package/monticello.meta/version

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,9 @@ getCurrentTaskAssignmentsWithId: processId
assignments := user getAllTaskAssignmentsWithId: processId in: bpmEnvironment.

"here search for already TAKEN <BpmTaskAssignment>"
self getAllUsers do: [:eachUser | | possibleAssignments roles |
self getAllUsers do: [:eachUser | | possibleAssignments |
possibleAssignments := (GsQuery fromSelectBlock: {:each | each.processId = processId} on: (eachUser getCurrentAssignmentsIn: bpmEnvironment)) queryResult.
roles := user roles.
assignments addAll: (possibleAssignments select: [:eachAssignment | roles identityIncludes: eachAssignment role]) .
assignments addAll: (possibleAssignments select: [:eachAssignment | user rolesIdentityIncludes: eachAssignment role]) .
].

^assignments
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"getCurrentTaskAssignmentsInApplication:" : "brunobb 03/21/2019 09:14",
"getCurrentTaskAssignmentsInApplication:andProcess:" : "brunobb 03/21/2019 09:15",
"getCurrentTaskAssignmentsInProcess:" : "brunobb 03/21/2019 09:14",
"getCurrentTaskAssignmentsWithId:" : "brunobb 09/10/2018 09:04",
"getCurrentTaskAssignmentsWithId:" : "bruno 07/24/2020 13:45",
"getFinishedAssignmentsIn:processName:formName:fieldName:initialValue:" : "brunobb 03/25/2019 08:43",
"getFinishedAssignmentsIn:processName:formName:fieldName:initialValue:endValue:" : "brunobb 03/25/2019 08:43",
"getFinishedTaskAssignmentsInApplication:" : "brunobb 03/21/2019 09:14",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ removeFromCache

self isAdminUser ifTrue: [ImproperBpmOperationException signal: '[admin] user can no be removed'].

self roles do: [:eachRole | eachRole ungrantUser: self].
self rolesDo: [:eachRole | eachRole ungrantUser: self].
rolesAssociation := Set new.

self getBpmEnvironments do: [:eachEnv | eachEnv unregisterUser: self].
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Accessing
rolesDo: aBlock

roles do: aBlock
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Accessing
rolesIdentityIncludes: aBpmRole

^roles identityIncludes: aBpmRole
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@
"printSystemRoleStructureIn:" : "brunobb 01/27/2020 11:09",
"regularListPagingSize" : "brunobb 01/27/2020 11:09",
"regularListPagingSize:" : "brunobb 01/27/2020 11:09",
"removeFromCache" : "brunobb 01/27/2020 11:09",
"removeFromCache" : "bruno 07/24/2020 13:46",
"removeFromGroup:" : "brunobb 01/30/2020 06:53",
"removeFromUserGroupsWith:" : "brunobb 01/30/2020 07:09",
"removeProperty:" : "brunobb 01/27/2020 11:09",
Expand All @@ -164,6 +164,8 @@
"roles:" : "brunobb 01/27/2020 11:09",
"rolesAssociationIsEmpty" : "bruno 07/24/2020 13:18",
"rolesAssociationSize" : "bruno 07/24/2020 13:19",
"rolesDo:" : "bruno 07/24/2020 13:46",
"rolesIdentityIncludes:" : "bruno 07/24/2020 13:44",
"rolesIn:" : "bruno 07/24/2020 13:15",
"rolesIsEmpty" : "bruno 07/24/2020 13:18",
"setCentralUserNamed:" : "brunobb 01/27/2020 11:09",
Expand Down
2 changes: 1 addition & 1 deletion repository/BpmRuntime.package/monticello.meta/version

Large diffs are not rendered by default.

0 comments on commit 87a1734

Please sign in to comment.