On 26/11/19 12:56, David Díaz wrote:
On 26/11/19 12:50, Ancor Gonzalez Sosa wrote:
[...] I wonder if you are aware of the existence of Yast::Confirm.MustBeRoot No, I wasn't. Thank you!
But, as discussed in the yast-bootloader PR[1], this is not a solution to manage when an specific module is running with enough permissions to perform all the intended actions. Instead, it only warns to the user that something might not work. Probably the suggestion from Stasiek[2] is right, but to be honest I wouldn't know where start :) See you. [1] https://github.com/yast/yast-bootloader/pull/583#issuecomment-558632678 [2] https://lists.opensuse.org/yast-devel/2019-11/msg00014.html
That's what most YaST modules seem to be using to report the situation to the user: https://github.com/search?q=org%3Ayast+MustBeRoot&type=Code
Cheers
-- David Díaz González YaST Team at SUSE Linux GmbH