File tree 1 file changed +5
-6
lines changed
1 file changed +5
-6
lines changed Original file line number Diff line number Diff line change @@ -23,19 +23,18 @@ fn Is_execute_allowed(Statistics: &Statistics_type, User: User_identifier_type)
23
23
}
24
24
25
25
// - Check if the user is the owner and has the execute permission
26
- let Is_root = User == Users :: User_identifier_type :: Root ;
27
-
28
- if ( Statistics . Get_user ( ) == User || Is_root )
29
- && Statistics . Get_permissions ( ) . Get_user ( ) . Get_execute ( )
30
- {
26
+ if User == User_identifier_type :: Root {
27
+ return true ;
28
+ }
29
+ if ( Statistics . Get_user ( ) == User ) && Statistics . Get_permissions ( ) . Get_user ( ) . Get_execute ( ) {
31
30
return true ;
32
31
}
33
32
34
33
// - Check if the user is in the group
35
34
let Is_in_group = Users :: Get_instance ( ) . Is_in_group ( User , Statistics . Get_group ( ) ) ;
36
35
37
36
// - Check if the user is in the group
38
- if ( Is_in_group || Is_root ) && Statistics . Get_permissions ( ) . Get_group ( ) . Get_execute ( ) {
37
+ if ( Is_in_group ) && Statistics . Get_permissions ( ) . Get_group ( ) . Get_execute ( ) {
39
38
return true ;
40
39
}
41
40
You can’t perform that action at this time.
0 commit comments