#1704: GRASS 7 cli startup enters into write protected/not owned mapset
---------------------+------------------------------------------------------
Reporter: neteler | Owner: grass-dev@…
Type: defect | Status: new
Priority: normal | Milestone: 7.0.0
Component: Startup | Version: svn-trunk
Keywords: | Platform: Linux
Cpu: x86-64 |
---------------------+------------------------------------------------------
When starting GRASS 7 via command line it lets the user
enter a mapset not belonging to him/her:
#1704: GRASS 7 cli startup enters into write protected/not owned mapset
---------------------+------------------------------------------------------
Reporter: neteler | Owner: grass-dev@…
Type: defect | Status: new
Priority: normal | Milestone: 7.0.0
Component: Startup | Version: svn-trunk
Keywords: | Platform: Linux
Cpu: x86-64 |
---------------------+------------------------------------------------------
Comment(by glynn):
Replying to [ticket:1704 neteler]:
> When starting GRASS 7 via command line it lets the user
> enter a mapset not belonging to him/her:
This isn't specific to 7.0. In 6.x, the ownership check is in
etc/set_data, which is only used for interactive startup.
> The wxGUI startup greys out not owned mapsets properly while
> the CLI startup is missing this check.
Something like the following in non_interactive() should work, provided
that g.mapset will work at that point in the startup:
{{{
if mapset not in grass.read_command('g.mapset', flags='l').strip().split()
fatal(_("<%s> is not a valid mapset") % mapset)
}}}