Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
arsnova-lite
Manage
Activity
Members
Labels
Plan
Issues
24
Issue boards
Milestones
Wiki
Code
Merge requests
2
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Help
Help
Support
GitLab documentation
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Privacy
Imprint
Contact
Snippets
Groups
Projects
Show more breadcrumbs
ARSnova
arsnova-lite
Commits
e1a95f91
Commit
e1a95f91
authored
5 years ago
by
Tom Käsler
Browse files
Options
Downloads
Patches
Plain Diff
Allow direct entry for participants
Login the user as guest if he enters the participant room page
parent
e0a1d3e2
1 merge request
!360
Improve roles and authentication
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/app/components/participant/room-participant-page/room-participant-page.component.ts
+10
-1
10 additions, 1 deletion
.../room-participant-page/room-participant-page.component.ts
with
10 additions
and
1 deletion
src/app/components/participant/room-participant-page/room-participant-page.component.ts
+
10
−
1
View file @
e1a95f91
import
{
Component
,
OnInit
}
from
'
@angular/core
'
;
import
{
Room
}
from
'
../../../models/room
'
;
import
{
User
}
from
'
../../../models/user
'
;
import
{
UserRole
}
from
'
../../../models/user-roles.enum
'
;
import
{
RoomPageComponent
}
from
'
../../shared/room-page/room-page.component
'
;
import
{
Location
}
from
'
@angular/common
'
;
import
{
RoomService
}
from
'
../../../services/http/room.service
'
;
...
...
@@ -8,6 +10,7 @@ import { TranslateService } from '@ngx-translate/core';
import
{
LanguageService
}
from
'
../../../services/util/language.service
'
;
import
{
WsCommentServiceService
}
from
'
../../../services/websockets/ws-comment-service.service
'
;
import
{
CommentService
}
from
'
../../../services/http/comment.service
'
;
import
{
AuthenticationService
}
from
'
../../../services/http/authentication.service
'
;
@
Component
({
selector
:
'
app-room-participant-page
'
,
...
...
@@ -19,6 +22,7 @@ export class RoomParticipantPageComponent extends RoomPageComponent implements O
room
:
Room
;
isLoading
=
true
;
deviceType
=
localStorage
.
getItem
(
'
deviceType
'
);
user
:
User
;
constructor
(
protected
location
:
Location
,
...
...
@@ -27,7 +31,8 @@ export class RoomParticipantPageComponent extends RoomPageComponent implements O
private
translateService
:
TranslateService
,
protected
langService
:
LanguageService
,
protected
wsCommentService
:
WsCommentServiceService
,
protected
commentService
:
CommentService
)
{
protected
commentService
:
CommentService
,
private
authenticationService
:
AuthenticationService
)
{
super
(
roomService
,
route
,
location
,
wsCommentService
,
commentService
);
langService
.
langEmitter
.
subscribe
(
lang
=>
translateService
.
use
(
lang
));
}
...
...
@@ -38,5 +43,9 @@ export class RoomParticipantPageComponent extends RoomPageComponent implements O
this
.
initializeRoom
(
params
[
'
roomId
'
]);
});
this
.
translateService
.
use
(
localStorage
.
getItem
(
'
currentLang
'
));
this
.
authenticationService
.
watchUser
.
subscribe
(
user
=>
this
.
user
=
user
);
if
(
!
this
.
user
)
{
this
.
authenticationService
.
guestLogin
(
UserRole
.
PARTICIPANT
).
subscribe
(
guestUser
=>
{});
}
}
}
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment