Skip to content

"fields" and "additional_fields" ignored in sync/config.json #327

@RenaudAubert

Description

@RenaudAubert

Hi!

I have permissions for a type object and default rules. I've deployed these changes using web UI and it works great.

The problem is when I try to pull the changes made in the UI using realm-cli the fields "fields" and "additional_fields" are not included same if I add them in my code and then push using cli.

Here's what I have

{
        "rules": {
            "Project": [
                {
                    "name": "readAuthorizedProject",
                    "applyWhen": {},
                    "write": {
                        "users": "%%user.id"
                    },
                    "fields": {
                        "sections": {
                            "write": true
                        }
                    },
                    "additional_fields": {
                        "read": true,
                        "write": false
                    }
                }
            ]
        },
        "defaultRoles": [
            {
                "name": "read-write",
                "applyWhen": {},
                "read": true,
                "write": true
            }
        ]
    }

And here's what I get if I pull

    {
        "rules": {
            "Project": [
                {
                    "name": "readAuthorizedProject",
                    "applyWhen": {},
                    "write": {
                        "users": "%%user.id"
                    }
                }
            ]
        },
        "defaultRoles": [
            {
                "name": "read-write",
                "applyWhen": {},
                "read": true,
                "write": true
            }
        ]
    }

I thought it might be the cli or app services simplifying my rules because they were unnecessarily complex but after testing my version is working as expected wheras the one with missing field is not what I want.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions