Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/main' into 4159-motion-w-amend…
Browse files Browse the repository at this point in the history
…-projection
  • Loading branch information
Elblinator committed Oct 2, 2024
2 parents 2a588d1 + ff2d6b1 commit 63f2335
Show file tree
Hide file tree
Showing 63 changed files with 1,039 additions and 678 deletions.
701 changes: 363 additions & 338 deletions client/package-lock.json

Large diffs are not rendered by default.

67 changes: 34 additions & 33 deletions client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,38 +36,38 @@
"get-available-languages": "npm run ts -- cli/get-available-languages.ts"
},
"dependencies": {
"@angular/animations": "^18.2.5",
"@angular/cdk": "^18.2.5",
"@angular/common": "^18.2.5",
"@angular/compiler": "^18.2.5",
"@angular/core": "^18.2.5",
"@angular/forms": "^18.2.5",
"@angular/material": "^18.2.5",
"@angular/material-date-fns-adapter": "^18.2.5",
"@angular/platform-browser": "^18.2.5",
"@angular/platform-browser-dynamic": "^18.2.5",
"@angular/router": "^18.2.5",
"@angular/service-worker": "^18.2.5",
"@angular/animations": "^18.2.6",
"@angular/cdk": "^18.2.6",
"@angular/common": "^18.2.6",
"@angular/compiler": "^18.2.6",
"@angular/core": "^18.2.6",
"@angular/forms": "^18.2.6",
"@angular/material": "^18.2.6",
"@angular/material-date-fns-adapter": "^18.2.6",
"@angular/platform-browser": "^18.2.6",
"@angular/platform-browser-dynamic": "^18.2.6",
"@angular/router": "^18.2.6",
"@angular/service-worker": "^18.2.6",
"@material/typography": "^14.0.0",
"@ngx-pwa/local-storage": "^18.0.0",
"@ngx-translate/core": "^15.0.0",
"@ngx-translate/http-loader": "^8.0.0",
"@tiptap/core": "^2.7.2",
"@tiptap/extension-color": "^2.7.2",
"@tiptap/extension-highlight": "^2.7.2",
"@tiptap/extension-image": "^2.7.2",
"@tiptap/extension-link": "^2.7.2",
"@tiptap/extension-subscript": "^2.7.2",
"@tiptap/extension-superscript": "^2.7.2",
"@tiptap/extension-table": "^2.7.2",
"@tiptap/extension-table-cell": "^2.7.2",
"@tiptap/extension-table-header": "^2.7.2",
"@tiptap/extension-table-row": "^2.7.2",
"@tiptap/extension-text-align": "^2.7.2",
"@tiptap/extension-text-style": "^2.5.4",
"@tiptap/extension-underline": "^2.7.2",
"@tiptap/pm": "^2.5.4",
"@tiptap/starter-kit": "^2.7.2",
"@tiptap/core": "^2.7.4",
"@tiptap/extension-color": "^2.7.4",
"@tiptap/extension-highlight": "^2.7.4",
"@tiptap/extension-image": "^2.7.4",
"@tiptap/extension-link": "^2.7.4",
"@tiptap/extension-subscript": "^2.7.4",
"@tiptap/extension-superscript": "^2.7.4",
"@tiptap/extension-table": "^2.7.4",
"@tiptap/extension-table-cell": "^2.7.4",
"@tiptap/extension-table-header": "^2.7.4",
"@tiptap/extension-table-row": "^2.7.4",
"@tiptap/extension-text-align": "^2.7.4",
"@tiptap/extension-text-style": "^2.7.4",
"@tiptap/extension-underline": "^2.7.4",
"@tiptap/pm": "^2.7.4",
"@tiptap/starter-kit": "^2.7.4",
"@tsparticles/angular": "^3.0.0",
"@tsparticles/engine": "^3.5.0",
"@tsparticles/plugin-emitters": "^3.5.0",
Expand All @@ -84,6 +84,7 @@
"material-design-icons-iconfont": "^6.7.0",
"ng2-charts": "^6.0.1",
"ng2-pdf-viewer": "^10.3.1",
"ngx-cookie-service": "^18.0.0",
"ngx-date-fns": "^11.0.0",
"ngx-device-detector": "^8.0.0",
"ngx-file-drop": "^16.0.0",
Expand All @@ -99,19 +100,19 @@
"zone.js": "^0.14.10"
},
"devDependencies": {
"@angular-devkit/build-angular": "^18.2.5",
"@angular-devkit/build-angular": "^18.2.6",
"@angular-eslint/builder": "^18.3.1",
"@angular-eslint/eslint-plugin": "^18.3.1",
"@angular-eslint/eslint-plugin-template": "^18.3.1",
"@angular-eslint/schematics": "^18.3.1",
"@angular-eslint/template-parser": "^18.3.1",
"@angular/cli": "^18.2.5",
"@angular/compiler-cli": "^18.2.5",
"@angular/cli": "^18.2.6",
"@angular/compiler-cli": "^18.2.6",
"@colsen1991/ngx-translate-extract-marker": "^2.0.8",
"@types/file-saver": "^2.0.7",
"@types/jasmine": "~5.1.4",
"@types/js-yaml": "^4.0.9",
"@types/node": "^20.16.5",
"@types/node": "^20.16.10",
"@types/pdfmake": "^0.2.9",
"@types/qrcode": "^1.5.5",
"@types/tinycolor2": "^1.4.6",
Expand All @@ -124,7 +125,7 @@
"eslint-plugin-prettier": "^5.2.1",
"eslint-plugin-simple-import-sort": "^12.1.1",
"eslint-plugin-unused-imports": "^4.1.4",
"fetch-mock": "^11.1.4",
"fetch-mock": "^11.1.5",
"jasmine-core": "~5.3.0",
"js-yaml": "^4.1.0",
"karma": "~6.4.4",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ export const meetingSettingsDefaults: { [key: string]: any } = {
motions_enable_reason_on_projector: false,
motions_enable_recommendation_on_projector: true,
motions_show_referring_motions: true,
motions_hide_metadata_background: false,
motions_enable_sidebox_on_projector: false,
motions_show_sequential_number: true,
motions_recommendation_text_mode: `diff`,
Expand Down
32 changes: 24 additions & 8 deletions client/src/app/domain/definitions/permission.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ export type PermissionsMap = { [key in Permission]?: Permission[] };
export interface DisplayPermission {
display_name: string;
help_text?: string;
anon_allowed?: boolean;
value: Permission;
}

Expand All @@ -24,13 +25,15 @@ export const PERMISSIONS: AppPermission[] = [
help_text: _(
`Can see the Autopilot menu item with all content for which appropriate permissions are set.`
),
anon_allowed: true,
value: Permission.meetingCanSeeAutopilot
},
{
display_name: _(`Can see the projector`),
help_text: _(
`Can see the Projector menu item and all projectors (in the Autopilot as well as in the Projector menu item)`
),
anon_allowed: true,
value: Permission.projectorCanSee
},
{
Expand All @@ -46,11 +49,13 @@ export const PERMISSIONS: AppPermission[] = [
{
display_name: _(`Can see agenda`),
help_text: _(`Can see the Agenda menu item and all public topics in the agenda.`),
anon_allowed: true,
value: Permission.agendaItemCanSee
},
{
display_name: _(`Can see internal items and time scheduling of agenda`),
help_text: _(`Can see all internal topics, schedules and comments.`),
anon_allowed: true,
value: Permission.agendaItemCanSeeInternal
},
{
Expand All @@ -63,6 +68,7 @@ export const PERMISSIONS: AppPermission[] = [
{
display_name: _(`Can see list of speakers`),
help_text: _(`Can see all lists of speakers`),
anon_allowed: true,
value: Permission.listOfSpeakersCanSee
},
{
Expand All @@ -74,7 +80,7 @@ export const PERMISSIONS: AppPermission[] = [
},
{
display_name: _(`Can put oneself on the list of speakers`),
help_text: _(`Is allowed to add himself/herself to the list of speakers.
help_text: _(`Is allowed to add himself/herself to the list of speakers.
Note:
Optional combination of requests to speak with presence status is possible. ( > [Settings] > [List of speakers] > [General] )`),
Expand All @@ -88,6 +94,7 @@ Optional combination of requests to speak with presence status is possible. ( >
{
display_name: _(`Can see moderation notes`),
help_text: _(`Can see all moderation notes in each list of speakers.`),
anon_allowed: true,
value: Permission.agendaItemCanSeeModeratorNotes
},
{
Expand All @@ -105,6 +112,7 @@ Optional combination of requests to speak with presence status is possible. ( >
help_text: _(
`Can see the Motions menu item and all motions unless they are limited by access restrictions in the workflow.`
),
anon_allowed: true,
value: Permission.motionCanSee
},
{
Expand All @@ -114,6 +122,7 @@ Optional combination of requests to speak with presence status is possible. ( >
Tip: Cross-check desired visibility of motions with test delegate account. `
),
anon_allowed: true,
value: Permission.motionCanSeeInternal
},
{
Expand All @@ -133,10 +142,10 @@ Tip: Cross-check desired visibility of motions with test delegate account. `
{
display_name: _(`Can forward motions`),
help_text: _(
`Can forward motions to other meetings within the OpenSlides instance.
`Can forward motions to other meetings within the OpenSlides instance.
Further requirements:
1. forwarding hierarchy must be set at the organizational level in the committee.
1. forwarding hierarchy must be set at the organizational level in the committee.
2. target meeting must be created.
3. forwarding must be activated in the workflow in the state.`
),
Expand Down Expand Up @@ -176,10 +185,11 @@ Further requirements:
{
display_name: _(`Can see elections`),
help_text: _(
`Can see the menu item Elections, including the list of candidates and results.
`Can see the menu item Elections, including the list of candidates and results.
Note: The right to vote is defined directly in the ballot.`
),
anon_allowed: true,
value: Permission.assignmentCanSee
},
{
Expand All @@ -191,7 +201,7 @@ Note: The right to vote is defined directly in the ballot.`
},
{
display_name: _(`Can nominate another participant`),
help_text: _(`Can nominate other participants as candidates.
help_text: _(`Can nominate other participants as candidates.
Requires group permission: [Can see participants]`),
value: Permission.assignmentCanNominateOther
Expand All @@ -209,17 +219,19 @@ Requires group permission: [Can see participants]`),
{
display_name: _(`Can see participants`),
help_text: _(
`Can see the menu item Participants and therefore the following data from all participants:
Personal data: Name, pronoun, gender.
`Can see the menu item Participants and therefore the following data from all participants:
Personal data: Name, pronoun, gender.
Meeting specific information: Structure level, Group, Participant number, About me, Presence status.`
),
anon_allowed: true,
value: Permission.userCanSee
},
{
display_name: _(`Can see sensitive data`),
help_text: _(
`Can see email, username, membership number, SSO identification and locked out state of all participants.`
),
anon_allowed: true,
value: Permission.userCanSeeSensitiveData
},
{
Expand Down Expand Up @@ -247,6 +259,7 @@ Meeting specific information: Structure level, Group, Participant number, About
help_text: _(`Can see the Files menu item and all shared folders and files.
Note: Sharing of folders and files may be restricted by group assignment.`),
anon_allowed: true,
value: Permission.mediafileCanSee
},
{
Expand All @@ -269,22 +282,25 @@ Note: Sharing of folders and files may be restricted by group assignment.`),
{
display_name: _(`Can see the front page`),
help_text: _(`Can see the Home menu item.`),
anon_allowed: true,
value: Permission.meetingCanSeeFrontpage
},
{
display_name: _(`Can see the live stream`),
help_text: _(
`Can see the livestream if there is a livestream URL entered in > [Settings] > [Livestream].`
),
anon_allowed: true,
value: Permission.meetingCanSeeLivestream
},
{
display_name: _(`Can see history`),
help_text: _(
`Can see the History menu item with the history of processing timestamps for motions, elections and participants.
`Can see the History menu item with the history of processing timestamps for motions, elections and participants.
Note: For privacy reasons, it is recommended to limit the rights to view the History significantly.`
),
anon_allowed: true,
value: Permission.meetingCanSeeHistory
},
{
Expand Down
6 changes: 5 additions & 1 deletion client/src/app/domain/models/meetings/meeting.ts
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,7 @@ export class Settings {
public motions_export_preamble!: string;
public motions_export_submitter_recommendation!: boolean;
public motions_export_follow_recommendation!: boolean;
public motions_hide_metadata_background: boolean;

public motion_poll_ballot_paper_selection!: BallotPaperSelection;
public motion_poll_ballot_paper_number!: number;
Expand Down Expand Up @@ -254,6 +255,7 @@ export class Meeting extends BaseModel<Meeting> {

public default_group_id!: Id; // group/default_group_for_meeting_id;
public admin_group_id!: Id; // group/admin_group_for_meeting_id;
public anonymous_group_id!: Id; // group/anonymous_group_for_meeting_id;

public list_of_speakers_countdown_id: Id; // projector_countdown/used_as_list_of_speakers_meeting_id;
public poll_countdown_id: Id; // projector_countdown/used_as_poll_countdown_meeting_id;
Expand Down Expand Up @@ -372,6 +374,7 @@ export class Meeting extends BaseModel<Meeting> {
`motions_enable_recommendation_on_projector`,
`motions_show_referring_motions`,
`motions_show_sequential_number`,
`motions_hide_metadata_background`,
`motions_recommendations_by`,
`motions_block_slide_columns`,
`motions_recommendation_text_mode`,
Expand Down Expand Up @@ -515,7 +518,8 @@ export class Meeting extends BaseModel<Meeting> {
`default_projector_motion_poll_ids`,
`default_projector_poll_ids`,
`default_group_id`,
`admin_group_id`
`admin_group_id`,
`anonymous_group_id`
];
}
export interface Meeting
Expand Down
6 changes: 6 additions & 0 deletions client/src/app/domain/models/users/group.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ export class Group extends BaseModel<Group> {

public meeting_user_ids!: Id[]; // (meeting_user/group_ids)[];
public default_group_for_meeting_id!: Id; // meeting/default_group_id;
public anonymous_group_for_meeting_id!: Id; // meeting/admin_group_id;
public admin_group_for_meeting_id!: Id; // meeting/admin_group_id;
public meeting_mediafile_access_group_ids!: Id[]; // (mediafile/access_group_ids)[];
public meeting_mediafile_inherited_access_group_ids!: Id[]; // (mediafile/inherited_access_group_ids)[];
Expand All @@ -34,6 +35,10 @@ export class Group extends BaseModel<Group> {
return !!this.admin_group_for_meeting_id;
}

public get isAnonymousGroup(): boolean {
return !!this.anonymous_group_for_meeting_id;
}

public get isDefaultGroup(): boolean {
return !!this.default_group_for_meeting_id;
}
Expand All @@ -50,6 +55,7 @@ export class Group extends BaseModel<Group> {
`weight`,
`meeting_user_ids`,
`default_group_for_meeting_id`,
`anonymous_group_for_meeting_id`,
`admin_group_for_meeting_id`,
`meeting_mediafile_access_group_ids`,
`meeting_mediafile_inherited_access_group_ids`,
Expand Down
4 changes: 3 additions & 1 deletion client/src/app/gateways/base-icc-gateway.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { filter, Observable } from 'rxjs';

import { SharedWorkerService } from '../openslides-main-module/services/shared-worker.service';
import { ActiveMeetingIdService } from '../site/pages/meetings/services/active-meeting-id.service';
import { OperatorService } from '../site/services/operator.service';
import { WorkerResponse } from '../worker/interfaces';
import { HttpService } from './http.service';

Expand Down Expand Up @@ -33,6 +34,7 @@ export abstract class BaseICCGatewayService<ICCResponseType> {

private httpService = inject(HttpService);
protected activeMeetingIdService = inject(ActiveMeetingIdService);
protected operator = inject(OperatorService);
private sharedWorker = inject(SharedWorkerService);

/**
Expand All @@ -41,7 +43,7 @@ export abstract class BaseICCGatewayService<ICCResponseType> {
*/
protected setupConnections(): void {
this.activeMeetingIdService.meetingIdObservable.subscribe(meetingId => {
if (meetingId) {
if (meetingId && !this.operator.isAnonymous) {
this.connect(meetingId);
} else {
this.disconnect();
Expand Down
3 changes: 1 addition & 2 deletions client/src/app/gateways/notify.service.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { Injectable } from '@angular/core';
import { Observable, Subject } from 'rxjs';
import { OperatorService } from 'src/app/site/services/operator.service';

import { BaseICCGatewayService } from './base-icc-gateway.service';

Expand Down Expand Up @@ -109,7 +108,7 @@ export class NotifyService extends BaseICCGatewayService<ChannelIdResponse | Not
/**
* Constructor to create the NotifyService.
*/
public constructor(private operator: OperatorService) {
public constructor() {
super();
this.setupConnections();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,8 @@ export class MeetingRepositoryService extends BaseRepository<ViewMeeting, Meetin
`committee_id`,
`group_ids`,
`language`,
`locked_from_inside`
`locked_from_inside`,
`enable_anonymous`
]);
const detailEditFields: TypedFieldset<Meeting> = [
`default_meeting_for_committee_id`,
Expand Down
Loading

0 comments on commit 63f2335

Please sign in to comment.