Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 3 of 3 for user_exists (0.19 sec)

  1. tests/test_param_in_path_and_dependency.py

    from fastapi import Depends, FastAPI
    from fastapi.testclient import TestClient
    
    app = FastAPI()
    
    
    async def user_exists(user_id: int):
        return True
    
    
    @app.get("/users/{user_id}", dependencies=[Depends(user_exists)])
    async def read_users(user_id: int):
        pass
    
    
    client = TestClient(app)
    
    
    def test_read_users():
        response = client.get("/users/42")
        assert response.status_code == 200, response.text
    
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Fri Jun 30 18:25:16 UTC 2023
    - 3.1K bytes
    - Viewed (0)
  2. cmd/iam-store.go

    	cache := store.rlock()
    	defer store.runlock()
    
    	userExists := false
    	var tempAccounts []UserIdentity
    	for _, v := range cache.iamUsersMap {
    		isDerived := false
    		if v.Credentials.IsServiceAccount() || v.Credentials.IsTemp() {
    			isDerived = true
    		}
    
    		if !isDerived && v.Credentials.AccessKey == accessKey {
    			userExists = true
    		} else if isDerived && v.Credentials.ParentUser == accessKey {
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Mon Oct 14 16:35:37 UTC 2024
    - 83.2K bytes
    - Viewed (0)
  3. cmd/iam.go

    		if userOrGroup == globalActiveCred.AccessKey {
    			err = errIAMActionNotAllowed
    			return
    		}
    
    		// Validate that user exists.
    		var userExists bool
    		_, userExists = sys.GetUser(ctx, userOrGroup)
    		if !userExists {
    			err = errNoSuchUser
    			return
    		}
    	}
    
    	updatedAt, addedOrRemoved, effectivePolicies, err = sys.store.PolicyDBUpdate(ctx, userOrGroup, isGroup,
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Tue Oct 29 16:01:48 UTC 2024
    - 74.6K bytes
    - Viewed (0)
Back to top