mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-18 12:37:53 +00:00
fix to accept login of user that does not have access to Chat
This commit is contained in:
@@ -8,6 +8,7 @@ import { AlertController } from '@ionic/angular';
|
||||
import { NotificationsService } from 'src/app/services/notifications.service';
|
||||
import { SessionStore } from 'src/app/store/session.service';
|
||||
import { ThemeService } from 'src/app/services/theme.service';
|
||||
import { PermissionService } from 'src/app/services/permission.service';
|
||||
|
||||
@Component({
|
||||
selector: 'app-inactivity',
|
||||
@@ -31,6 +32,7 @@ export class InactivityPage implements OnInit {
|
||||
private toastService: ToastService,
|
||||
public alertController: AlertController,
|
||||
public ThemeService: ThemeService,
|
||||
public p: PermissionService,
|
||||
) {}
|
||||
|
||||
loop = false
|
||||
@@ -115,10 +117,15 @@ export class InactivityPage implements OnInit {
|
||||
|
||||
if (attempt) {
|
||||
|
||||
|
||||
// if current attemp is equal to the current user
|
||||
if (attempt.UserId == SessionStore.user.UserId) {
|
||||
await this.authService.SetSession(attempt, this.userattempt);
|
||||
this.authService.loginChat();
|
||||
|
||||
if(this.p.userPermission(this.p.permissionList.Chat.access)){
|
||||
this.authService.loginChat();
|
||||
}
|
||||
|
||||
this.getToken();
|
||||
SessionStore.setInativity(true)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user