You can use Parse Dashboard with master key, but not public dashboards.
I think you should have a âRoleâ like âadminâ, that users on this role will be granted to run some âcloud functionsâ (from parse SDK/API), the server check if the user has this role, if has go ahead and run the function, for example:
/// Check if user is on the Role
/// ---------------------------------------------------------------------------------------
async function userInRole({ roleName, user }) {
const query = new Parse.Query(Parse.Role)
query.equalTo('name', roleName)
query.equalTo('users', user)
return await query.first({ useMasterKey: true })
}
/// Cloud code function
/// ---------------------------------------------------------------------------------------
Parse.Cloud.define('runMasterKeyQuery', async (req) => {
// get user from request
const { user } = req
// check if the user are on the admin role
const isAdmin = await userInRole({ roleName: 'admin', user.id })
if (!isAdmin) {
throw `You don't have permission to continue.`
}
// rest of the code that require "useMasterKey" or not, but only run by the server side, by admin users.
...
})