Пример #1
0
	def is_setup_okay(self, args):
		"""
		Validates if setup has been performed after database allocation
		"""

		from server_tools.gateway_utils import get_total_users
		
		args = eval(args)
		#webnotes.logger.error("args in set_account_details of setup_control: " + str(args))
		
		cp_defaults = webnotes.conn.get_value('Control Panel', None, 'account_id')
		
		user_profile = webnotes.conn.get_value('Profile', args['user'], 'name')
		
		from webnotes.utils import cint
		
		total_users = get_total_users()
		
		#webnotes.logger.error("setup_control.is_setup_okay: " + cp_defaults + " " + user_profile + " " + str(total_users))
		
		#webnotes.logger.error("setup_control.is_setup_okay: Passed Values:" + args['account_name'] + " " + args['user'] + " " + str(args['total_users']))
		
		if (cp_defaults==args['account_name']) and user_profile and \
		   (total_users==cint(args['total_users'])):
		   return 'True'
Пример #2
0
	def is_setup_okay(self, args):
		"""
		Validates if setup has been performed after database allocation
		"""

		from server_tools.gateway_utils import get_total_users
		
		args = eval(args)		
		cp_defaults = webnotes.conn.get_value('Control Panel', None, 'account_id')
		user_profile = webnotes.conn.get_value('Profile', args['user'], 'name')
		
		from webnotes.utils import cint
		
		total_users = get_total_users()
						
		if (cp_defaults==args['account_name']) and user_profile and \
		   (total_users==cint(args['total_users'])):
		   return 'True'
Пример #3
0
    def is_setup_okay(self, args):
        """
		Validates if setup has been performed after database allocation
		"""

        from server_tools.gateway_utils import get_total_users

        args = eval(args)
        cp_defaults = webnotes.conn.get_value('Control Panel', None,
                                              'account_id')
        user_profile = webnotes.conn.get_value('Profile', args['user'], 'name')

        from webnotes.utils import cint

        total_users = get_total_users()

        if (cp_defaults==args['account_name']) and user_profile and \
           (total_users==cint(args['total_users'])):
            return 'True'