File tree Expand file tree Collapse file tree 6 files changed +24
-24
lines changed Expand file tree Collapse file tree 6 files changed +24
-24
lines changed Original file line number Diff line number Diff line change 11< ng-container *ngIf ="auth.userRoles?.admin == true ">
2- < h1 > Panel admina </ h1 >
2+ < h1 > Admin panel </ h1 >
33 < h3 > Aktualny tryb persystencji logowania: {{ selectedPersistence }}</ h3 >
44 < div class ="inline ">
55 < h3 > Wybierz tryb persystencji logowania:</ h3 >
@@ -10,7 +10,7 @@ <h3>Wybierz tryb persystencji logowania:</h3>
1010 </ select >
1111 </ div >
1212
13- < h2 > Zarządzaj użytkownikami </ h2 >
13+ < h2 > Manage users </ h2 >
1414 < ng-container *ngIf ="users != [] ">
1515 < table class ="table-desktop ">
1616 < tr >
Original file line number Diff line number Diff line change @@ -24,10 +24,10 @@ export class AuthService {
2424 private fb : FireBaseServiceService
2525 ) {
2626 afAuth . authState . subscribe ( async ( ev : any ) => {
27- console . log ( this . userRoles ) ;
28- console . log ( this . isLoggedIn ( ) ) ;
29- console . log ( this . userData ) ;
30- console . log ( ' ' ) ;
27+ // console.log(this.userRoles);
28+ // console.log(this.isLoggedIn());
29+ // console.log(this.userData);
30+ // console.log(' ');
3131 if ( ev ) {
3232 this . userData = ev ;
3333 const roles = await this . fb . getUserRoles ( ev ?. uid ) ;
@@ -42,10 +42,10 @@ export class AuthService {
4242 banned : false ,
4343 } ;
4444 }
45- console . log ( this . userRoles ) ;
46- console . log ( this . isLoggedIn ( ) ) ;
47- console . log ( this . userData ) ;
48- console . log ( ' ' ) ;
45+ // console.log(this.userRoles);
46+ // console.log(this.isLoggedIn());
47+ // console.log(this.userData);
48+ // console.log(' ');
4949 } ) ;
5050 }
5151
Original file line number Diff line number Diff line change 11< div class ="center ">
2- < h2 > Informacje o użytkowniku </ h2 >
2+ < h2 > User information </ h2 >
33 < ul >
44 < li > < strong > Email: </ strong > {{auth.userData.email}}</ li >
5- < li > < strong > Email potwierdzony : </ strong > {{auth.userData.emailVerified}}</ li >
5+ < li > < strong > Email confirmed : </ strong > {{auth.userData.emailVerified}}</ li >
66 < li > < strong > UserID: </ strong > {{auth.userData.uid}} </ li >
7- < li > < strong > Konto stworzone : </ strong > {{auth.userData.metadata.creationTime}}</ li >
8- < li > < strong > Ostatnie logowanie : </ strong > {{auth.userData.metadata.lastSignInTime}} </ li >
7+ < li > < strong > Account created : </ strong > {{auth.userData.metadata.creationTime}}</ li >
8+ < li > < strong > Last successfull log in : </ strong > {{auth.userData.metadata.lastSignInTime}} </ li >
99 </ ul >
10- < h2 > Twoje uprawnienia </ h2 >
10+ < h2 > Your privileges </ h2 >
1111 < ul >
12- < li > < strong > Gość : </ strong > {{auth.userRoles?.guest}}</ li >
13- < li > < strong > Klient : </ strong > {{auth.userRoles?.client}}</ li >
14- < li > < strong > Menager : </ strong > {{auth.userRoles?.menager}}</ li >
12+ < li > < strong > Guest : </ strong > {{auth.userRoles?.guest}}</ li >
13+ < li > < strong > Client : </ strong > {{auth.userRoles?.client}}</ li >
14+ < li > < strong > Manager : </ strong > {{auth.userRoles?.menager}}</ li >
1515 < li > < strong > Admin: </ strong > {{auth.userRoles?.admin}}</ li >
1616 < li > < strong > Banned: </ strong > {{auth.userRoles?.banned}}</ li >
1717 </ ul >
18- < h2 > Historia zamówień </ h2 >
18+ < h2 > Order history </ h2 >
1919 < table >
2020 < tr >
2121 < th > Date</ th >
Original file line number Diff line number Diff line change @@ -23,7 +23,7 @@ export class AdminGuard implements CanActivate {
2323 | UrlTree {
2424 return this . auth . getAuthenticated ( ) . pipe (
2525 map ( ( user ) => {
26- console . log ( this . auth . userRoles . admin ) ;
26+ // console.log(this.auth.userRoles.admin);
2727 if ( this . auth . userRoles . admin !== true ) {
2828 this . router . navigate ( [ '' ] ) ;
2929 return false ;
Original file line number Diff line number Diff line change @@ -32,7 +32,7 @@ export class AuthGuard implements CanActivate {
3232 return this . auth . getAuthenticated ( ) . pipe (
3333 map ( ( state ) => {
3434 if ( state == null ) {
35- console . log ( 'AUTH OUT' ) ;
35+ // console.log('AUTH OUT');
3636 this . router . navigate ( [ '' ] ) ;
3737 return false ;
3838 }
Original file line number Diff line number Diff line change @@ -23,12 +23,12 @@ export class MenagerGuard implements CanActivate {
2323 | Promise < boolean | UrlTree >
2424 | boolean
2525 | UrlTree {
26- console . log ( this . auth . userRoles . menager ) ;
26+ // console.log(this.auth.userRoles.menager);
2727 if ( this . auth . userRoles . menager ) {
28- console . log ( 'MENAGER IN' ) ;
28+ // console.log('MENAGER IN');
2929 return true ;
3030 }
31- console . log ( 'MENAGER OUT' ) ;
31+ // console.log('MENAGER OUT');
3232 this . router . navigate ( [ '' ] ) ;
3333 return false ;
3434
You can’t perform that action at this time.
0 commit comments