File tree Expand file tree Collapse file tree 1 file changed +11
-17
lines changed
Expand file tree Collapse file tree 1 file changed +11
-17
lines changed Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ const PROFILE_MAIN_MENU_CONTRIBUTION_KEY = "profile.MainMenu";
1515class ProfileMainMenu extends Component {
1616 constructor ( props ) {
1717 super ( props ) ;
18- this . isWorker = props . modulesManager . getConf ( "fe-insuree " , "isWorker" , false ) ;
18+ this . isWorker = props . modulesManager . getConf ( "fe-core " , "isWorker" , false ) ;
1919 }
2020
2121 render ( ) {
@@ -28,21 +28,13 @@ class ProfileMainMenu extends Component {
2828 } ,
2929 ] ;
3030
31- this . isWorker
32- ? entries . push ( {
33- text : formatMessage ( intl , "profile" , "menu.changePassword" ) ,
34- icon : < Fingerprint /> ,
35- route : "/profile/mobile/password" ,
36- } )
37- : entries . push ( {
38- text : formatMessage (
39- this . props . intl ,
40- "profile" ,
41- "menu.changePassword"
42- ) ,
43- icon : < Fingerprint /> ,
44- route : "/profile/changePassword" ,
45- } ) ;
31+ if ( ! this . isWorker ) {
32+ entries . push ( {
33+ text : formatMessage ( intl , "profile" , "menu.changePassword" ) ,
34+ icon : < Fingerprint /> ,
35+ route : "/profile/changePassword" ,
36+ } ) ;
37+ }
4638
4739 entries . push (
4840 ...modulesManager
@@ -65,4 +57,6 @@ const mapStateToProps = (state) => ({
6557 rights : state . core ?. user ?. i_user ?. rights ?? [ ] ,
6658} ) ;
6759
68- export default injectIntl ( withModulesManager ( connect ( mapStateToProps ) ( ProfileMainMenu ) ) ) ;
60+ export default injectIntl (
61+ withModulesManager ( connect ( mapStateToProps ) ( ProfileMainMenu ) )
62+ ) ;
You can’t perform that action at this time.
0 commit comments