Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 25 for getUser (0.19 sec)

  1. tests/query_test.go

    	users := []User{
    		*GetUser("find_in_batches_with_offset_limit", Config{}),
    		*GetUser("find_in_batches_with_offset_limit", Config{}),
    		*GetUser("find_in_batches_with_offset_limit", Config{}),
    		*GetUser("find_in_batches_with_offset_limit", Config{}),
    		*GetUser("find_in_batches_with_offset_limit", Config{}),
    		*GetUser("find_in_batches_with_offset_limit", Config{}),
    		*GetUser("find_in_batches_with_offset_limit", Config{}),
    Go
    - Registered: Sun Apr 28 09:35:09 GMT 2024
    - Last Modified: Thu Apr 25 12:22:53 GMT 2024
    - 49.8K bytes
    - Viewed (0)
  2. tests/preload_test.go

    	DB.Preload("Pets.Toy").Find(&user4, "id = ?", user.ID)
    	CheckUser(t, *user4, user)
    }
    
    func TestNestedPreloadForSlice(t *testing.T) {
    	users := []User{
    		*GetUser("slice_nested_preload_1", Config{Pets: 2}),
    		*GetUser("slice_nested_preload_2", Config{Pets: 0}),
    		*GetUser("slice_nested_preload_3", Config{Pets: 3}),
    	}
    
    	for _, user := range users {
    		for idx, pet := range user.Pets {
    Go
    - Registered: Sun Apr 28 09:35:09 GMT 2024
    - Last Modified: Thu Apr 25 12:21:03 GMT 2024
    - 14.9K bytes
    - Viewed (0)
  3. cmd/jwt.go

    	}
    	claims := xjwt.NewMapClaims()
    	if err := xjwt.ParseWithClaims(token, claims, func(claims *xjwt.MapClaims) ([]byte, error) {
    		if claims.AccessKey != globalActiveCred.AccessKey {
    			u, ok := globalIAMSys.GetUser(req.Context(), claims.AccessKey)
    			if !ok {
    				// Credentials will be invalid but for disabled
    				// return a different error in such a scenario.
    				if u.Credentials.Status == auth.AccountOff {
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Fri Apr 19 16:45:14 GMT 2024
    - 5.4K bytes
    - Viewed (0)
  4. cmd/sftp-server.go

    							"accessKey": c.User(),
    						},
    						Extensions: make(map[string]string),
    					}, nil
    				}
    				return nil, errAuthentication
    			}
    
    			ui, ok := globalIAMSys.GetUser(context.Background(), c.User())
    			if !ok {
    				return nil, errNoSuchUser
    			}
    
    			if subtle.ConstantTimeCompare([]byte(ui.Credentials.SecretKey), pass) == 1 {
    				return &ssh.Permissions{
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Thu Apr 04 12:04:40 GMT 2024
    - 5.6K bytes
    - Viewed (0)
  5. cmd/iam.go

    			// Ignore any deletion error.
    			_, _ = sys.PolicyDBSet(ctx, origKeys[0], "", stsUser, isGroup)
    		}
    	}
    	return nil
    }
    
    // GetUser - get user credentials
    func (sys *IAMSys) GetUser(ctx context.Context, accessKey string) (u UserIdentity, ok bool) {
    	if !sys.Initialized() {
    		return u, false
    	}
    
    	if accessKey == globalActiveCred.AccessKey {
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Thu Apr 25 21:28:16 GMT 2024
    - 71.1K bytes
    - Viewed (1)
  6. cmd/ftp-server-driver.go

    	}
    
    	ui, ok := globalIAMSys.GetUser(context.Background(), username)
    	if !ok {
    		return false, nil
    	}
    	return subtle.ConstantTimeCompare([]byte(ui.Credentials.SecretKey), []byte(password)) == 1, nil
    }
    
    func (driver *ftpDriver) getMinIOClient(ctx *ftp.Context) (*minio.Client, error) {
    	ui, ok := globalIAMSys.GetUser(context.Background(), ctx.Sess.LoginUser())
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Fri Apr 19 12:23:42 GMT 2024
    - 13.6K bytes
    - Viewed (0)
  7. cmd/sftp-server-driver.go

    	return sftp.Handlers{
    		FileGet:  handler,
    		FilePut:  handler,
    		FileCmd:  handler,
    		FileList: handler,
    	}
    }
    
    func (f *sftpDriver) getMinIOClient() (*minio.Client, error) {
    	ui, ok := globalIAMSys.GetUser(context.Background(), f.AccessKey())
    	if !ok && !globalIAMSys.LDAPConfig.Enabled() {
    		return nil, errNoSuchUser
    	}
    	if !ok && globalIAMSys.LDAPConfig.Enabled() {
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Fri Apr 19 12:23:42 GMT 2024
    - 12.9K bytes
    - Viewed (0)
  8. cmd/admin-handlers-users.go

    	if accessKey == globalActiveCred.AccessKey {
    		writeErrorResponseJSON(ctx, w, errorCodes.ToAPIErr(ErrAddUserInvalidArgument), r.URL)
    		return
    	}
    
    	user, exists := globalIAMSys.GetUser(ctx, accessKey)
    	if exists && (user.Credentials.IsTemp() || user.Credentials.IsServiceAccount()) {
    		// Updating STS credential is not allowed, and this API does not
    		// support updating service accounts.
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Thu Apr 25 15:50:16 GMT 2024
    - 77.3K bytes
    - Viewed (0)
  9. cmd/iam-store.go

    // HasWatcher - returns if the storage system has a watcher.
    func (store *IAMStoreSys) HasWatcher() bool {
    	_, ok := store.IAMStorageAPI.(iamStorageWatcher)
    	return ok
    }
    
    // GetUser - fetches credential from memory.
    func (store *IAMStoreSys) GetUser(user string) (UserIdentity, bool) {
    	cache := store.rlock()
    	defer store.runlock()
    
    	u, ok := cache.iamUsersMap[user]
    	if !ok {
    		// Check the sts map
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Sat Apr 27 10:04:10 GMT 2024
    - 75.2K bytes
    - Viewed (2)
  10. cmd/site-replication.go

    		return nil, errSRPeerNotFound
    	}
    	return getAdminClient(endpoint, creds.AccessKey, creds.SecretKey)
    }
    
    func (c *SiteReplicationSys) getPeerCreds() (*auth.Credentials, error) {
    	u, ok := globalIAMSys.store.GetUser(c.state.ServiceAccountAccessKey)
    	if !ok {
    		return nil, errors.New("site replication service account not found")
    	}
    	return &u.Credentials, nil
    }
    
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Thu Apr 25 15:50:16 GMT 2024
    - 184.1K bytes
    - Viewed (1)
Back to top