Skip to content

Commit

Permalink
Merge pull request #16023 from tom-anders/studyMobile
Browse files Browse the repository at this point in the history
add mobile OAuth scope to mine.*() study endpoints
  • Loading branch information
ornicar authored Sep 9, 2024
2 parents feec682 + e3e31e1 commit 5846801
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions app/controllers/Study.scala
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ final class Study(
apiStudies(pag)
)

def mine(order: Order, page: Int) = Auth { ctx ?=> me ?=>
def mine(order: Order, page: Int) = AuthOrScoped(_.Web.Mobile) { ctx ?=> me ?=>
for
pag <- env.study.pager.mine(order, page)
_ <- preloadMembers(pag)
Expand All @@ -96,7 +96,7 @@ final class Study(
yield res
}

def minePublic(order: Order, page: Int) = Auth { ctx ?=> me ?=>
def minePublic(order: Order, page: Int) = AuthOrScoped(_.Web.Mobile) { ctx ?=> me ?=>
for
pag <- env.study.pager.minePublic(order, page)
_ <- preloadMembers(pag)
Expand All @@ -107,7 +107,7 @@ final class Study(
yield res
}

def minePrivate(order: Order, page: Int) = Auth { ctx ?=> me ?=>
def minePrivate(order: Order, page: Int) = AuthOrScoped(_.Web.Mobile) { ctx ?=> me ?=>
for
pag <- env.study.pager.minePrivate(order, page)
_ <- preloadMembers(pag)
Expand All @@ -119,7 +119,7 @@ final class Study(

}

def mineMember(order: Order, page: Int) = Auth { ctx ?=> me ?=>
def mineMember(order: Order, page: Int) = AuthOrScoped(_.Web.Mobile) { ctx ?=> me ?=>
for
pag <- env.study.pager.mineMember(order, page)
_ <- preloadMembers(pag)
Expand All @@ -135,7 +135,7 @@ final class Study(
yield res
}

def mineLikes(order: Order, page: Int) = Auth { ctx ?=> me ?=>
def mineLikes(order: Order, page: Int) = AuthOrScoped(_.Web.Mobile) { ctx ?=> me ?=>
for
pag <- env.study.pager.mineLikes(order, page)
_ <- preloadMembers(pag)
Expand Down

0 comments on commit 5846801

Please sign in to comment.