File tree Expand file tree Collapse file tree 1 file changed +12
-10
lines changed
extensions/gdpr/js/src/forum/extenders Expand file tree Collapse file tree 1 file changed +12
-10
lines changed Original file line number Diff line number Diff line change @@ -27,16 +27,18 @@ export default function extendUserSettingsPage() {
2727 override ( 'flarum/forum/components/SettingsPage' , 'dataItems' , function ( ) : ItemList < Mithril . Children > {
2828 const items = new ItemList < Mithril . Children > ( ) ;
2929
30- items . add (
31- 'gdprErasure' ,
32- < div className = "Form-group gdprErasure-container" >
33- < p className = "helpText" > { app . translator . trans ( 'flarum-gdpr.forum.settings.request_erasure_help' ) } </ p >
34- < Button className = "Button Button-gdprErasure" icon = "fas fa-user-minus" onclick = { ( ) => app . modal . show ( RequestErasureModal as any ) } >
35- { app . translator . trans ( 'flarum-gdpr.forum.settings.request_erasure_button' ) }
36- </ Button >
37- </ div > ,
38- 50
39- ) ;
30+ if ( this . user === app . session . user ) {
31+ items . add (
32+ 'gdprErasure' ,
33+ < div className = "Form-group gdprErasure-container" >
34+ < p className = "helpText" > { app . translator . trans ( 'flarum-gdpr.forum.settings.request_erasure_help' ) } </ p >
35+ < Button className = "Button Button-gdprErasure" icon = "fas fa-user-minus" onclick = { ( ) => app . modal . show ( RequestErasureModal as any ) } >
36+ { app . translator . trans ( 'flarum-gdpr.forum.settings.request_erasure_button' ) }
37+ </ Button >
38+ </ div > ,
39+ 50
40+ ) ;
41+ }
4042
4143 items . add (
4244 'gdprExport' ,
You can’t perform that action at this time.
0 commit comments