Overview

TBD.

Authentication related helpers:

@import ch.insign.playauth.views.helper._
 
@authenticated { party =>
    Hello @party.getName
}
 
@notAuthenticated {
    @remembered { party =>
        Welcome back @party.getName, please confirm your identity: [ enter password here ].
    }
 
    @notRemembered {
        Please, #login or #register.
    }
}
 
@anonymous {
    Please, #login or #register.
}
 
@notAnonymous { party =>
    @authenticated { party =>
        Hello @party.getName
    }
 
    @remembered { party =>
        Welcome back @party.getName, please confirm your identity: [ enter password here ].
    }
}
@impersonated { (currParty, origParty) =>
    Hello @currParty.getName
    #returnBack to @origParty.getName account
}

 

Authorization related helpers:

@import ch.insign.playauth.views.helper._
@import ch.insign.playauth.party.support.PartyPermission
@import ch.insign.playauth.party.Party
@import your.domain.model.SubtypeOfParty
 
 
@hasPermission(PartyPermission.UPDATE) {
    You are able to update any Party
}
 
@hasPermission(PartyPermission.UPDATE(classOf[SubtypeOfParty])) {
    You are able to update all SubtypeOfParty
}
 
@hasPermission(PartyPermission.UPDATE(partyObj)) {
    You are able to update @partyObj.getName
}
 
@lacksPermission(PartyPermission.UPDATE(partyObj)) {
    You are NOT able to update @partyObj.getName
}
 
@hasAnyPermision(PartyPermission.UPDATE(partyObj), PartyPermission.DELETE(partyObj)) {
    You can update or delete @partyObj.getName
}
 
@lacksAnyPermision(PartyPermission.UPDATE(partyObj), PartyPermission.DELETE(partyObj)) {
    You can NOT update and/or delete @partyObj.getName
}