/// <summary> /// Retrieve a list of permissions that correspond to a specific user and database. /// Full description: http://docs.cpanel.net /// </summary> /// <param name="db">The database that corresponds to the user whose permissions you wish to view.</param> /// <param name="user"> The user whose permissions you wish to view.</param> public MysqlUserdbprivs Call_MysqlFE_userdbprivs(string db, string user) { var xDocument = Call2("MysqlFE::userdbprivs", "db", db, "user", user); var d = xDocument.OriginalResult.Descendants("data").First(); return(MysqlUserdbprivs.FromXElement(d)); }
/// <summary> /// Grant a user permission to access a database within a cPanel account. /// Full description: http://docs.cpanel.net /// </summary> /// <param name="dbname">The name of the database to allow the user to access.</param> /// <param name="dbuser">The MySQL user who should be given access to the database.</param> /// <param name="perm">A space-separated list of permissions to grant to the user (e.g., "all" or "alter drop create delete insert update lock" ).</param> public void Call_Mysql_adduserdb(string dbname, string dbuser, MysqlUserdbprivs perm) { var x = Call1("Mysql::adduserdb", dbname, dbuser, perm.GetAsString()); }