Merge pull request #5530 from FinnStutzenstein/hotfix
Fixed errors in client
This commit is contained in:
commit
7a1e7c298d
2
.gitignore
vendored
2
.gitignore
vendored
@ -19,7 +19,7 @@
|
|||||||
Thumbs.db
|
Thumbs.db
|
||||||
# Virtual Environment
|
# Virtual Environment
|
||||||
.virtualenv*/*
|
.virtualenv*/*
|
||||||
.venv/*
|
.venv
|
||||||
server/.venv
|
server/.venv
|
||||||
|
|
||||||
## Compatibility
|
## Compatibility
|
||||||
|
@ -500,6 +500,9 @@ export class UserRepositoryService extends BaseRepository<ViewUser, User, UserTi
|
|||||||
}
|
}
|
||||||
|
|
||||||
private preventAlterationOnDemoUsers(users: ViewUser | ViewUser[]): void {
|
private preventAlterationOnDemoUsers(users: ViewUser | ViewUser[]): void {
|
||||||
|
if (!this.demoModeUserIds) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
if (Array.isArray(users)) {
|
if (Array.isArray(users)) {
|
||||||
if (users.map(user => user.id).intersect(this.demoModeUserIds).length > 0) {
|
if (users.map(user => user.id).intersect(this.demoModeUserIds).length > 0) {
|
||||||
this.preventInDemo();
|
this.preventInDemo();
|
||||||
|
@ -68,6 +68,9 @@ export class LoadFontService {
|
|||||||
*/
|
*/
|
||||||
private setCustomProjectorFont(font: any, weight: number): void {
|
private setCustomProjectorFont(font: any, weight: number): void {
|
||||||
const path = font.path ? font.path : font.default;
|
const path = font.path ? font.path : font.default;
|
||||||
|
if (!path) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
const url = font.path ? `${this.urlPrefix}${path}` : path;
|
const url = font.path ? `${this.urlPrefix}${path}` : path;
|
||||||
const fontFace = new FontFace('customProjectorFont', `url(${url})`, { weight: weight });
|
const fontFace = new FontFace('customProjectorFont', `url(${url})`, { weight: weight });
|
||||||
fontFace
|
fontFace
|
||||||
|
@ -43,10 +43,11 @@ export class VotingService {
|
|||||||
* @returns null if no errors exist (= user can vote) or else a VotingError
|
* @returns null if no errors exist (= user can vote) or else a VotingError
|
||||||
*/
|
*/
|
||||||
public getVotePermissionError(poll: ViewBasePoll): VotingError | void {
|
public getVotePermissionError(poll: ViewBasePoll): VotingError | void {
|
||||||
const user = this.operator.viewUser;
|
|
||||||
if (this.operator.isAnonymous) {
|
if (this.operator.isAnonymous) {
|
||||||
return VotingError.USER_IS_ANONYMOUS;
|
return VotingError.USER_IS_ANONYMOUS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const user = this.operator.user;
|
||||||
if (!poll.groups_id.intersect(user.groups_id).length) {
|
if (!poll.groups_id.intersect(user.groups_id).length) {
|
||||||
return VotingError.USER_HAS_NO_PERMISSION;
|
return VotingError.USER_HAS_NO_PERMISSION;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user