Skip to content

Commit

Permalink
Mark mod_last commands with 'use' directive
Browse files Browse the repository at this point in the history
  • Loading branch information
Premwoik committed Jul 28, 2022
1 parent f5beee9 commit 240bfab
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
14 changes: 7 additions & 7 deletions priv/graphql/schemas/admin/last.gql
Original file line number Diff line number Diff line change
@@ -1,34 +1,34 @@
"""
Allow admin to manage last activity.
"""
type LastAdminQuery @protected{
type LastAdminQuery @use(modules: ["mod_last"]) @protected{
"Get the user's last activity information"
getLast(user: JID!): LastActivity
@protected(type: DOMAIN, args: ["user"])
@use(arg: "user") @protected(type: DOMAIN, args: ["user"])
"Get the number of users active from the given timestamp"
countActiveUsers(domain: String!, timestamp: DateTime): Int
@protected(type: DOMAIN, args: ["domain"])
@use(arg: "domain") @protected(type: DOMAIN, args: ["domain"])
"""
List users that didn't log in the last days or have never logged in.
Globally or for a specified domain
"""
listOldUsers(domain: String, timestamp: DateTime!): [OldUser!]
@protected(type: DOMAIN, args: ["domain"])
@use(arg: "domain") @protected(type: DOMAIN, args: ["domain"])
}

"""
Allow admin to get information about last activity.
"""
type LastAdminMutation @protected{
type LastAdminMutation @use(modules: ["mod_last"]) @protected{
"Set user's last activity information"
setLast(user: JID!, timestamp: DateTime, status: String!): LastActivity
@protected(type: DOMAIN, args: ["user"])
@use(arg: "user") @protected(type: DOMAIN, args: ["user"])
"""
Delete users that didn't log in the last days or have never logged in.
Globally or for a specified domain. Please use listOldUsers to check which users will be deleted
"""
removeOldUsers(domain: String, timestamp: DateTime!): [OldUser!]
@protected(type: DOMAIN, args: ["domain"])
@use(arg: "domain") @protected(type: DOMAIN, args: ["domain"])
}

"""
Expand Down
8 changes: 4 additions & 4 deletions priv/graphql/schemas/user/last.gql
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
"""
Allow user to manage last activity.
"""
type LastUserQuery @protected{
type LastUserQuery @use(modules: ["mod_last"]) @protected{
"Get the user's last activity information"
getLast(user: JID): LastActivity
getLast(user: JID): LastActivity @use
}

"""
Allow user to get information about last activity.
"""
type LastUserMutation @protected{
type LastUserMutation @use(modules: ["mod_last"]) @protected{
"Set user's last activity information"
setLast(timestamp: DateTime, status: String!): LastActivity
setLast(timestamp: DateTime, status: String!): LastActivity @use
}

0 comments on commit 240bfab

Please sign in to comment.