Skip to content

Instantly share code, notes, and snippets.

View zmokhtar's full-sized avatar

Zeki Mokhtarzada zmokhtar

  • Tenovos
  • Silver Spring, MD
View GitHub Profile
@zmokhtar
zmokhtar / getSiteList
Last active December 26, 2015 11:19 — forked from imrank1webs/getSiteList
Page<ApiMemberSite> getSites(Member member, boolean includeSubscriptions, int pageNum, int pageSize) {
List permissions = [Permission.OWNER,Permission.ADMIN]
if(includeSubscriptions){
permissions.add(Permission.MEMBER)
}
List<ApiMemberSite> sites = new ArrayList<ApiMemberSite>()
Page<Subscription> subscriptions = memberService.getSiteMemberships(member, permissions, pageNum, pageSize)
subscriptions.elements.each {