Icingaweb2 user role permission

Is there a way we can assign viewer permission to a user in icingaweb2

Sure. Write permissions are only those that allow to issue commands. So if a user has no configuration access and no permission to issue commands, it’s effectively a read only user.

Thank you for your quick reply,
So if a user has no configuration access and no permission to issue commands, it’s effectively a read only user.

How to do that in roles.ini file in icngaweb2 ?’

Do yourself a favor and don’t edit roles.ini by hand. Use the access control configuration. There just allow the user general access for a particular module and, at least in case of monitoring/icingadb, it should result in a read-only authorization.