![]() ![]() HttpConn.request("POST", tokenURL, params, headers) HttpConn = httplib.HTTPConnection(serverName, serverPort) # Counter to get through the column header of the input file # Dictionaries to store user and role information # InFile = r"C:\testing\agsUsersRoles.txt" InFile = raw_input("Path to comma-delimited text file containing users and roles: ") # Input File with the Role and user information ServerName = raw_input("Enter server name: ") Password = getpass.getpass("Enter password: ") Username = raw_input("Enter user name: ") # Ask for admin/publisher user name and password # User,Role,RoleType,Password,EMail,FullName,Description # They should be listed in the following format and saved in a file with a. # This script creates a bank of users and roles given a comma-separated text file This example does not assign descriptions to the roles, nor does it assign a user to two or more roles however, it could be extended to do both of these things using the ArcGIS REST API. Also, use care to match the role names and privileges correctly on each line. ![]() When running a script like this, be aware that the initial passwords are not secure and users should change them immediately. These are the types of properties that you're able to supply when creating a user or role manually in Manager. The Police Users and Fire Users roles could later be allowed visibility to differing subsets of services by a server administrator.Įach line represents one user and contains the following items, in order: The user name, a role for the user, the permissions to grant the role, the initial password, the e-mail address of the user, the user's full name, and a description for the user. The above file would create six users and four roles (Administrators, Publishers, Police Users, and Fire Users). ![]() KimballS,Police Scott,Police department member Garza,Server Osgoode,Publisher from police Jones,Publisher from fire departmentĬlaudeM,Police Miller,Police department member ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |