diff --git a/app/views/user/mod.scala.html b/app/views/user/mod.scala.html index 1fd54074ff..c6cedd2bcb 100644 --- a/app/views/user/mod.scala.html +++ b/app/views/user/mod.scala.html @@ -203,17 +203,24 @@ } + @charges.headOption.map { firstCharge =>
- Patron payments@if(charges.isEmpty){: none.} - @if(charges.nonEmpty) { + + Patron payments + @if(isGranted(_.PayPal)) { + @firstCharge.payPal.flatMap(_.subId).map { subId => + - [PayPal sub] + } + } +
- }
+ }
Moderation history@if(history.isEmpty){: nothing to show.} @if(history.nonEmpty) { diff --git a/modules/security/src/main/Permission.scala b/modules/security/src/main/Permission.scala index db735058b2..5e8fe9944a 100644 --- a/modules/security/src/main/Permission.scala +++ b/modules/security/src/main/Permission.scala @@ -47,6 +47,7 @@ object Permission { case object ModMessage extends Permission("ROLE_MOD_MESSAGE") case object Impersonate extends Permission("ROLE_IMPERSONATE") case object DisapproveCoachReview extends Permission("ROLE_DISAPPROVE_COACH_REVIEW") + case object PayPal extends Permission("ROLE_PAYPAL") case object Hunter extends Permission("ROLE_HUNTER", List( ViewBlurs, MarkEngine, MarkBooster, StaffForum, @@ -62,7 +63,7 @@ object Permission { )) case object SuperAdmin extends Permission("ROLE_SUPER_ADMIN", List( - Admin, ChangePermission, PublicMod, Developer, Impersonate + Admin, ChangePermission, PublicMod, Developer, Impersonate, PayPal )) lazy val allButSuperAdmin: List[Permission] = List(