Skip to content

Commit

Permalink
Merge branch 'master' into production
Browse files Browse the repository at this point in the history
  • Loading branch information
bodnara committed Sep 27, 2023
2 parents 7e4b33d + e6e460d commit e098056
Show file tree
Hide file tree
Showing 26 changed files with 922 additions and 265 deletions.
112 changes: 71 additions & 41 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@
"@semantic-release/changelog": "6.0.3",
"@semantic-release/exec": "6.0.3",
"@semantic-release/git": "10.0.1",
"@semantic-release/github": "9.0.4",
"@semantic-release/github": "9.0.7",
"commitizen": "4.3.0",
"conventional-changelog-conventionalcommits": "6.1.0",
"inquirer": "8.2.6",
"semantic-release": "21.1.1"
"semantic-release": "21.1.2"
},
"config": {
"commitizen": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,13 @@ public void startProcessingEvents() {
eventProcessorThread = new Thread(eventLogger);
eventProcessorThread.start();

log.debug("Event processor thread started.");
log.info("Event processor thread started.");
System.out.println("Event processor thread started.");
}

public void stopProcessingEvents() {
eventProcessorThread.interrupt();
log.debug("Event processor thread interrupted.");
log.info("Event processor thread interrupted.");
System.out.println("Event processor thread interrupted.");
}

Expand Down
3 changes: 1 addition & 2 deletions perun-auditlogger/src/main/resources/logback.xml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
<appender-ref ref="perun-auditlogger"/>
</root>

<logger name="cz.metacentrum.perun.auditlogger" level="debug"/>
<logger name="cz.metacentrum.perun.auditlogger" level="info"/>

<!-- keep Spring quiet -->
<logger name="org.springframework" level="warn"/>
Expand All @@ -35,7 +35,6 @@
<appender class="org.gnieh.logback.SystemdJournalAppender" name="journal-audit">
<syslogIdentifier>perun_audit</syslogIdentifier>
<logLoggerName>true</logLoggerName>
<logStacktrace>false</logStacktrace>
<encoder>
<pattern>%msg</pattern>
</encoder>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

import cz.metacentrum.perun.core.api.Group;
import cz.metacentrum.perun.core.api.Vo;
import org.springframework.util.StringUtils;

import java.util.ArrayList;
import java.util.List;

/**
* Application form of a VO. Use {@link cz.metacentrum.perun.registrar.RegistrarManager#getFormItems} for items.
Expand All @@ -16,7 +20,7 @@ public class ApplicationForm {
private boolean automaticApproval;
private boolean automaticApprovalExtension;
private boolean automaticApprovalEmbedded;
private String moduleClassName;
private final List<String> moduleClassNames = new ArrayList<>();

public ApplicationForm() {
}
Expand Down Expand Up @@ -69,12 +73,29 @@ public void setAutomaticApprovalEmbedded(boolean automaticApprovalEmbedded) {
this.automaticApprovalEmbedded = automaticApprovalEmbedded;
}

public String getModuleClassName() {
return moduleClassName;
public List<String> getModuleClassNames() {
return new ArrayList<>(moduleClassNames);
}

public void setModuleClassNames(List<String> moduleClassNames) {
this.moduleClassNames.clear();
for (String moduleClassName : moduleClassNames) {
if (StringUtils.hasText(moduleClassName)) {
this.moduleClassNames.add(moduleClassName);
}
}
}

public void addModuleClassName(String moduleClassName) {
if (StringUtils.hasText(moduleClassName)) {
this.moduleClassNames.add(moduleClassName);
}
}

public void setModuleClassName(String moduleClassName) {
this.moduleClassName = moduleClassName;
public void removeModuleClassName(String moduleClassName) {
if (StringUtils.hasText(moduleClassName)) {
this.moduleClassNames.remove(moduleClassName);
}
}

/**
Expand All @@ -94,7 +115,7 @@ public String toString() {
", group='" + getGroup() + '\'' +
", automaticApproval='" + isAutomaticApproval() + '\'' +
", automaticApprovalExtension='" + isAutomaticApprovalExtension() + '\'' +
", moduleClassName='" + getModuleClassName() + '\'' +
", moduleClassNames='" + getModuleClassNames() + '\'' +
"]";
}

Expand Down
6 changes: 6 additions & 0 deletions perun-base/src/main/resources/perun-roles.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8310,6 +8310,9 @@ perun_roles_management:
- GROUPOBSERVER: Group
- GROUPMEMBERSHIPMANAGER: Group
- SPREGAPPLICATION:
- RESOURCEADMIN: Vo
- RESOURCEOBSERVER: Vo
- TRUSTEDFACILITYADMIN: Vo
associated_read_roles:
- GROUPOBSERVER
assignable_to_attributes: true
Expand Down Expand Up @@ -8371,6 +8374,9 @@ perun_roles_management:
- GROUPADMIN: Group
- GROUPOBSERVER: Group
- GROUPMEMBERSHIPMANAGER: Group
- RESOURCEADMIN: Vo
- RESOURCEOBSERVER: Vo
- TRUSTEDFACILITYADMIN: Vo
associated_read_roles: []
assignable_to_attributes: true
display_name: "Group membership manager"
Expand Down
6 changes: 3 additions & 3 deletions perun-base/src/test/resources/test-schema.sql
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
-- database version 3.2.17 (don't forget to update insert statement at the end of file)
-- database version 3.2.18 (don't forget to update insert statement at the end of file)
CREATE EXTENSION IF NOT EXISTS "unaccent";
CREATE EXTENSION IF NOT EXISTS "pgcrypto";

Expand Down Expand Up @@ -539,7 +539,7 @@ create table application_form (
automatic_approval boolean default false not null, --approval of application is automatic
automatic_approval_extension boolean default false not null, --approval of extension is automatic
automatic_approval_embedded boolean default false not null, --approval of embedded application is automatic
module_name varchar, --name of module which processes application
module_names varchar, --name of modules (separated by comma) which are called when processing application
group_id integer, --identifier of group (groups.id) if application is for group
created_by_uid integer,
modified_by_uid integer,
Expand Down Expand Up @@ -1908,7 +1908,7 @@ create index idx_fk_attr_critops ON attribute_critical_actions(attr_id);
create index app_state_idx ON application (state);

-- set initial Perun DB version
insert into configurations values ('DATABASE VERSION','3.2.17');
insert into configurations values ('DATABASE VERSION','3.2.18');
-- insert membership types
insert into membership_types (id, membership_type, description) values (1, 'DIRECT', 'Member is directly added into group');
insert into membership_types (id, membership_type, description) values (2, 'INDIRECT', 'Member is added indirectly through UNION relation');
Expand Down
5 changes: 5 additions & 0 deletions perun-cli/Perun/MembersAgent.pm
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,11 @@ sub getRichMembers
return Perun::Common::callManagerMethod('getRichMembers', '[]RichMember', @_);
}

sub getRichMember
{
return Perun::Common::callManagerMethod('getRichMember', 'RichMember', @_);
}

sub getRichMembersWithAttributes
{
return Perun::Common::callManagerMethod('getRichMembersWithAttributes', '[]RichMember', @_);
Expand Down
Loading

0 comments on commit e098056

Please sign in to comment.