(className)
| 3695 | } |
| 3696 | |
| 3697 | async function setupProtectedClass(className) { |
| 3698 | const config = Config.get(Parse.applicationId); |
| 3699 | const schemaController = await config.database.loadSchema(); |
| 3700 | await schemaController.addClassIfNotExists(className, { |
| 3701 | secretField: { type: 'String' }, |
| 3702 | publicField: { type: 'String' }, |
| 3703 | }); |
| 3704 | await schemaController.updateClass( |
| 3705 | className, |
| 3706 | {}, |
| 3707 | { |
| 3708 | find: { '*': true }, |
| 3709 | get: { '*': true }, |
| 3710 | create: { '*': true }, |
| 3711 | update: { '*': true }, |
| 3712 | delete: { '*': true }, |
| 3713 | addField: {}, |
| 3714 | protectedFields: { '*': ['secretField'] }, |
| 3715 | } |
| 3716 | ); |
| 3717 | } |
| 3718 | |
| 3719 | it('should deliver protected fields to master key LiveQuery client', async () => { |
| 3720 | const className = 'MasterKeyProtectedClass'; |
no test coverage detected
searching dependent graphs…