Ravada::Auth::SQL - Online Linux Manual PageSection : 3
Updated : 2021-03-05
Source : perl v5.32.1
Note : User Contributed Perl Documentation

NAMERavada::Auth::SQL − SQL authentication library for Ravada

BUILDInternal OO build method

search_by_idSearches a user by its id ​ my $user = Ravada::Auth::SQL−>search_by_id( $id );

list_all_usersReturns a list of all the usernames

add_userAdds a new user in the SQL database. Returns nothing. ​ Ravada::Auth::SQL::add_user( ​ name => $user ​ , password => $pass ​ , is_admin => 0 ​ , is_temporary => 0 ​ );

loginLogins the user ​ my $ok = $user−>login($password); ​ my $ok = Ravada::LDAP::SQL::login($name, $password); returns true if it succeeds

make_adminMakes the user admin. Returns nothing. ​ Ravada::Auth::SQL::make_admin($id);

remove_adminRemove user admin privileges. Returns nothing. ​ Ravada::Auth::SQL::remove_admin($id);

external_authSets or gets the external auth value of an user.

is_adminReturns true if the user is admin. ​ my $is = $user−>is_admin;

is_user_managerReturns true if the user is user manager

is_operatorReturns true if the user is admin or has been granted special permissions

can_list_own_machinesReturns true if the user can list her own virtual machines at the web frontend (can_XXXXX)

can_list_clones_from_own_baseReturns true if the user can list all machines that are clones from his bases (can_XXXXX_clones)

can_list_clonesReturns true if the user can list all machines that are clones and its bases (can_XXXXX_clones_all)

can_list_machinesReturns true if the user can list all the virtual machines at the web frontend (can_XXXXX_all or is_admin)

is_externalReturns true if the user authentication is not from SQL ​ my $is = $user−>is_external;

is_temporaryReturns true if the user is admin. ​ my $is = $user−>is_temporary;

idReturns the user id ​ my $id = $user−>id;

change_passwordChanges the password of an User ​ $user−>change_password(); Arguments: password

compare_passwordChanges the input with the password of an User ​ $user−>compare_password(); Arguments: password

language​ Updates or selects the language selected for an User ​ ​ $user−>language(); ​ ​ Arguments: lang

removeRemoves the user ​ $user−>remove();

can_doReturns if the user is allowed to perform a privileged action ​ if ($user−>can_do("remove")) { ​ ...

can_do_domainReturns if the user is allowed to perform a privileged action in a virtual machine ​ if ($user−>can_do_domain("remove", $domain)) { ​ ...

grant_user_permissionsGrant an user permissions for normal users

grant_operator_permissionsGrant an user operator permissions, ie: hibernate all

grant_manager_permissionsGrant an user manager permissions, ie: hibernate all clones

grant_admin_permissionsGrant an user all the permissions

revoke_all_permissionsRevoke all permissions from an user

grantGrant an user a specific permission, or revoke it ​ $admin_user−>grant($user2,"clone"); # both are ​ $admin_user−>grant($user3,"clone",1); # the same ​ ​ $admin_user−>grant($user4,"clone",0); # revoke a grant

revokeRevoke a permission from an user ​ $admin_user−>revoke($user2,"clone");

list_all_permissionsReturns a list of all the available permissions

list_permissionsReturns a list of all the permissions granted to the user sub can_change_settings($self, $id_domain=undef) {
    if (!defined
$id_domain) {
        return
$self>can_do(change_settings);
    }
    return 1 if
$self>can_change_settings_all();
​ return 0 if !$self−>can_change_settings(); ​ ​ my $domain = Ravada::Front::Domain−>open($id_domain); ​ return 1 if $self−>id == $domain−>id_owner; ​ ​ return 0; ​}

can_manage_machineThe user can change settings, remove or change other things yet to be defined. Some changes require special permissions granted. Unlinke change_settings that any user is granted to his own machines by default.

can_remove_clonesReturns true if the user can remove clones. Arguments: • id_domain: optional

can_remove_machineReturn true if the user can remove this machine Arguments: • domain

can_shutdown_machineReturn true if the user can shutdown this machine Arguments: • domain

grantsReturns a list of permissions granted to the user in a hash

ldap_entryReturns the ldap entry as a Net::LDAP::Entry of the user if it has ​LDAP external authentication
0
Johanes Gumabo
Data Size   :   23,772 byte
man-Ravada::Auth::SQL.3pmBuild   :   2024-12-05, 20:55   :  
Visitor Screen   :   x
Visitor Counter ( page / site )   :   3 / 171,087
Visitor ID   :     :  
Visitor IP   :   3.23.101.241   :  
Visitor Provider   :   AMAZON-02   :  
Provider Position ( lat x lon )   :   39.962500 x -83.006100   :   x
Provider Accuracy Radius ( km )   :   1000   :  
Provider City   :   Columbus   :  
Provider Province   :   Ohio ,   :   ,
Provider Country   :   United States   :  
Provider Continent   :   North America   :  
Visitor Recorder   :   Version   :  
Visitor Recorder   :   Library   :  
Online Linux Manual Page   :   Version   :   Online Linux Manual Page - Fedora.40 - march=x86-64 - mtune=generic - 24.12.05
Online Linux Manual Page   :   Library   :   lib_c - 24.10.03 - march=x86-64 - mtune=generic - Fedora.40
Online Linux Manual Page   :   Library   :   lib_m - 24.10.03 - march=x86-64 - mtune=generic - Fedora.40
Data Base   :   Version   :   Online Linux Manual Page Database - 24.04.13 - march=x86-64 - mtune=generic - fedora-38
Data Base   :   Library   :   lib_c - 23.02.07 - march=x86-64 - mtune=generic - fedora.36

Very long time ago, I have the best tutor, Wenzel Svojanovsky . If someone knows the email address of Wenzel Svojanovsky , please send an email to johanes_gumabo@yahoo.co.id .
If error, please print screen and send to johanes_gumabo@yahoo.co.id
Under development. Support me via PayPal.

ERROR : Need New Coding :         (parse_manual_page_|249|Ravada::Auth::SQL.3pm|36/37|el══─{─══.|.el══─{─══. ds -- \|\(em\| )         (htmlprn|149|Ravada::Auth::SQL.3pm|36/37|.el══─{─══. ds --  —  |.el══─{─══. ds -- \|\(em\| )         (parse_manual_page_|249|Ravada::Auth::SQL.3pm|43|br══─}─══|'br══─}─══ )         (htmlprn|149|Ravada::Auth::SQL.3pm|43|'br══─}─══ |'br══─}─══ )